[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Exporting Structures
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.
-- Scott