[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
oversight?
Date: Fri, 11 Oct 85 09:47:43 CDT
From: wagner@GSWD-VMS
On page 418 of CLtL, concerning the OPEN function: "The filename
...may be a string, a pathname, or a stream." May it not also be
a symbol, and shouldn't the spec say so? Same for WITH-OPEN-FILE,
etc.? (The underlying pathname functions work with symbols.)
It's true that most places in the manual say that symbols are acceptable
where pathnames are required, and are parsed as namestrings. I don't
understand why this feature is in there; it seems like asking for trouble.
What about implementations (yes they exist) where some streams are
implemented as symbols? How do you tell whether a symbol was supposed to
be a stream or supposed to be a string? What if NIL is accidentally used
where a pathname was expected, do you really want to get a file named "NIL"?
It's possible that the feature of allowing symbols as pathnames was blindly
copied from an old version of Zetalisp, which used to allow that. A couple
of bad ideas got into Common Lisp that way, in spite of significant effort
by the committee to try to keep it from happening. Zetalisp allowed symbols
for compatibility with an old version of pdp-10 Maclisp that didn't have
strings.