[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Probe-File and proposed extension.
The point about relative pathnames is the following: When you
actually write a file, Open resolves any relative pathname down to an
absolute pathname. Any implementation that allows writing relative
pathnames must have some way to map the relative pathname to an
absolute pathname. This mapping is not necessarily the same as merge
pathnames, and in any case, there is no way in Common Lisp to
determine what the defaults are.
In Spice Lisp, when you open a file for write, Open first looks
for any file with that name on the default search list, and if found,
overwrites it, otherwise it creates a file in the current directory.
I will argue that this is the right semantics in our implementation,
and it is clearly implementation dependent.
Regardeless of the error issue, it would be useful to be able to
default a pathname for output in this fashion.
As for the error issue, Spice Lisp currently does exactly what you
suggest. A user complained that this was not what the manual said it
should do. I tried both the Dec-20 Clisp and the Kyoto Common Lisp
implementations, and they both refused to signal errors, no matter
what garbage you gave them. I decided at this point that the issue
was unclear, but that the Spice Lisp implementation was probably
wrong.
Rob