[Top][All Lists]

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

Re: [Chicken-hackers] [PATCH] Remove change-directory and change-directo

From: John Cowan
Subject: Re: [Chicken-hackers] [PATCH] Remove change-directory and change-directory*
Date: Sun, 13 Aug 2017 17:12:40 -0400

On Sun, Aug 13, 2017 at 12:40 PM, Peter Bex <address@hidden> wrote:

This opens an important question though: Should current-directory return
whatever is passed in, or should it call itself with no arguments to get
the name of the directory we changed into?  Note that this will fail if
we passed in a file descriptor to a directory which was unlinked!  So
even though this is somewhat weird I think just returning whatever was
passed in (if the change succeeded) is probably the best we can do.
Trying to return a normalized pathname if a string is passed in could
be acceptable, but might be too much magic.

 With this change, `current-directory` has the same protocol as a parameter, although it cannot be passed to `parameterize`.  Therefore I think it should return its argument, which is what Chicken parameter objects do when called with one argument.  (SRFI 29 says such calls return an undefined value, and R7RS does not define the effect of calling parameters with an argument.)
John Cowan        address@hidden
Kill Gorgun!  Kill orc-folk!  No other words please Wild Men.  Drive away
bad air and darkness with bright iron!   --Ghan-buri-Ghan

reply via email to

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