On Mar 15, 2013, at 3:35 PM, Peter Bex wrote:
> 
> Finally, a flag would also need to go everywhere a path is accessed
> (including file-open, directory, directory?, call-with-input-file, etc...)
> unless you make it a parameter (which would be slower, if I'm not
> mistaken).

Oops, I see you already mentioned the parameter possibility.

Sure, it would be slower in theory, but looking at the code
for e.g. open-input-file I doubt you would even notice.  And
looking at something like with-input-from-file, which calls
apply, fluid-let, call-with-values, values, and apply again,
you will certainly not notice the difference in that case.

I think it would unusual to specify this flag on a per-call
basis; more typically it would be once at toplevel, so you're
not really incurring a per-call penalty to set the parameter,
just a small penalty to read the parameter in the procedure.
In a case where you normally don't want expansion but
occasionally do, you can call expand-path directly, so I
would argue for an expand-path procedure + expand-pathnames
parameter.

That said, even if you go the parameter way, you probably
need a backwards-compatibility module anyway.

Jim

_______________________________________________
Chicken-hackers mailing list
Chicken-hackers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-hackers

Reply via email to