[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] "include" filename resolution
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.)
Scheme-reports mailing list