On Sun, Aug 13, 2017 at 12:40 PM, Peter Bex <pe...@more-magic.net> 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 http://vrici.lojban.org/~cowan co...@ccil.org Kill Gorgun! Kill orc-folk! No other words please Wild Men. Drive away bad air and darkness with bright iron! --Ghan-buri-Ghan
_______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers