Hi,

Andy Wingo <wi...@pobox.com> skribis:

> On Fri 17 Feb 2012 23:49, l...@gnu.org (Ludovic Courtès) writes:
>
>> Would it work to let the user call it themself if needed, like:
>>
>>   (add-to-load-path (dirname (canonicalize-path (current-filename))))
>
> I would rather have current-filename do a
>
>   (or (false-if-exception (canonicalize-path p)) p)
>
> Current-filename sounds like it should do the right thing, if possible.

I think it’s often undesirable.

Suppose you want to use ‘current-filename’ in an ‘assert’ macro, for
instance: what you want is a hint, not an absolute path, since that path
is likely to be invalid at the time you see it (for instance, it could
point to the source tree on a build machine of your distro.)

Furthermore, including absolute paths by default makes builds
non-deterministic: two users would get different binaries, just because
they built things under a different directory.

Thus, I’d rather let users call ‘canonicalize-path’ when they know what
they’re doing, and know that they actually need it.

WDYT?

Thanks,
Ludo’.

Reply via email to