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

DEFSTRUCT options syntax



I guess I could go either way on forcing DEFSTRUCT and friends to be
consistent with the rest of the language.  Consistency is nice, and
important enough that the change is not gratuitous, but should be
abandoned if it really is screwing things up.  "...the hobgoblin of
little minds" and all that.

As a piece of additional food for thought, Gary Brown of DEC has been
working out the details of a red-pages extension to the Vax Common Lisp
that would allow the Lisp user to access the more complex file types
(especially record-oriented ones) in RMS.  The obvious thing to do is to
add a bunch of new options to OPEN and WITH-OPEN-FILE to specify the
additional attributes that RMS needs to know about -- record size,
buffering strategy, etc.  This, too, would look much cleaner if some of
the keywords could take multiple args.  Note that OPEN is really
"DEF-STREAM", sort of -- all the open-ended requirements for specifying
a complicated new object, albeit a volatile one, are present.  There are
other ways to do this for OPEN, I guess, as there are for the other
"defs"; my point is just that OPEN is pretty much like the others.

I'm uneasy about making special forms too special, and creating forms
that the user cannot duplicate with macros or some such.  Perhaps we can
extend the basic keyword mechanism to allow keyword/value, but also
allow calling forms like (foo :key1 value1 (:key2 value2a value2b) ...)
However, coming up with an attractive way to specify this in a macro's
lambda-list will be pretty tough.

-- Scott