[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
equality of structures, or *default-structure-type*
A defstruct not given the :type option is the one area where CL's defstruct
tries to go beyond the "record structure" semantics, and enter the area of
limited "object based" programming. It's somewhat ironic that only when
you don't specify :type do the elements of the defined structure become
full-fledged members of the common-lisp type system; i.e., they are
identifiably of of the defined type rather than the implementational type.
Many persons have criticized this merger of capabilities in defstruct. The
most popular direction, however, is not to "fix" the problem with non-:type
structures, but to hail the coming of the Common Lisp Object System, which
will do a much grander job of providing object-oriented capabilities. All
the interesting properties of defaultly-typed defstructs will be subsumed
by defclass. Then, the use of defstruct could be, conventionally, limited
to :type structures.
-- JonL --