[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Date: Tue, 6 Dec 1983 17:34 EST
From: Scott E. Fahlman <Fahlman@CMU-CS-C.ARPA>
We now have some real Common Lisp users around here, and they are
finding the holes at a steady pace. One, found by Mike Jones, concerns
the interaction of packages and DEFSTRUCT. Unless I'm missing
something, the language currently has no way to tell a DEFSTRUCT to
export all of the various accessors and other forms it defines. You
don't want exporting by default -- the majority of structures are for
internal use within a subsystem -- but when you do want to export all of
the handles on some structure it is a pain to do this for each accessor.
Proposal: add an :EXPORT option to DEFSTRUCT that causes each of the
defined forms to be exported from the current package. (If people like
this solution, it could become one of the "semi-official extensions"
until the second edition of the Common Lisp Book of the Dead takes shape.
There are currently no automatic exportation things at all. The language
design assumes that you will always list the symbols you want to export in
one place, e.g. in a single call to the function EXPORT.
It is probably reasonable to have some auto-export things, although as
we know this can be dangerous if over-used. DEFSTRUCT is only one application.
Making a "semi official extension" (I assume you really mean it would be a yellow
pages package except that it is inextricably intertwined with DEFSTRUCT proper)
seems like a reasonable idea. I hope the documentation will be less vague
than "causes each of the defined forms to be exported from the current package."
I don't even know what a defined form is.