Re: [Scheme-reports] "include" filename resolution
Andy Wingo 13 Aug 2011 12:08 UTC
On Sat 13 Aug 2011 00:29, John Cowan <cowan@mercury.ccil.org> writes:
> Andy Wingo scripsit:
>
>> ;;; To get around all of this, we're going to do something nasty, and
>> ;;; turn `load' into a macro.
>
> That would be the versions of "include" and "include-ci" in the load
> module. The load procedure is for when you really do need to decide
> at run time where you are loading code from.
Include is valuable, no doubt about it. However `load' with relative
paths does not make any portable kind of sense. If you want to load
code at runtime portably, build an absolute path. Otherwise there are
all kinds of expectations that are reasonable: load relative to the
current working directory (of the process or of the thread? I hear UNIX
and Windows do different things here), load relative to the module
that's doing the loading, load relative to the root of the search path,
etc. (I accept some points about load paths not always being the right
thing, but they aren't going to magically go away, nor is the code that
relies on them.)
Andy
--
http://wingolog.org/
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports