chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.


From: Jim Ursetto
Subject: Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.
Date: Fri, 15 Mar 2013 16:17:07 -0500

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]