[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SAFIER%cgi.csnet: proposed modification to common lisp]
From: Scott <SAFIER%cgi.csnet at RELAY.CS.NET>
Re: proposed modification to common lisp
Proposal: the following functions be modified to include a parameter which
specifies a package:
read, read-delimited-list, read-preserving-white-space
This additional parameter could either be a keyword argument, or an optional
argument. If the package is not specified, the current package (*package*)
will be used as the default.
[...] Also, it is
burdensome for the common lisp programmar to create a local lexical
environment around input functions, simply to insure that any symbols created
during input are interned in the proper package. A package argument for these
input functions removes this burden.
1. These functions already have a just-barely managable number of
optional parameters, and adding another would push them over the
2. Converting them to use all keyword args might have been a good
idea three or four years ago, but isn't feasible now.
3. This functionality can be easily implemented at user level, with
a few macros.
By the way, Read-From-String probably belongs in the list above. It
already takes both optional and keyword arguments, so extending it along
with the others complicates (or simplifies, depending on how you look at
it) the situation a bit.
But how about this: introduce a new function, Parse, which is to Read as
Write is to Print -- a big fancy general-purpose I/O function that takes
all imaginable keyword arguments and Does The Right Thing. Whether or
not it would preserve whitespace would be one argument. We could either
leave Read-Delimited-List out of this, or add Parse-Delimited-List as