Re: [Scheme-reports] "include" filename resolution Denis Washington (08 Aug 2011 11:54 UTC)
Re: [Scheme-reports] "include" filename resolution John Cowan (08 Aug 2011 12:06 UTC)
Re: [Scheme-reports] "include" filename resolution Per Bothner (08 Aug 2011 17:12 UTC)
Re: [Scheme-reports] "include" filename resolution Andy Wingo (12 Aug 2011 20:31 UTC)
Re: [Scheme-reports] "include" filename resolution John Cowan (12 Aug 2011 22:29 UTC)

Re: [Scheme-reports] "include" filename resolution Denis Washington 08 Aug 2011 11:53 UTC

Am 08.08.2011 13:37, schrieb John Cowan:
> Denis Washington scripsit:
>
>> I was wondering how implementations are thought to resolve file names in
>> module "include" forms: relative to the including source file or the
>> current working directory? Only the former would be really useful IMO,
>> but there is no mention of this concern in the draft. I know that file
>> name resolution is actually out of scope for the report, but a sentence
>> hinting to what is intended might be nice.
>
> If I were an implementer, I'd do what gcc does: look in the directory
> of the including file, then in a list of user-specified places, then
> in a list of implementation-specified places.
>
>> (If every implementation
>> interprets this differently, "include" becomes useless.)
>
> I don't really understand this claim.

If a few implementations decide to use the working directory as base for
"include" file names - which wouldn't be such far-fetched decision,
given that "load" works the that way on most systems - one couldn't rely
on, e.g., the including file's directory to be searched. Which would be
bad. (However, I might overestimate the likeliness of this happening.)

Regards,
Denis

_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports