From: Daniel H. <dhe...@te...> - 2010-04-28 04:22:24
|
On Wed, 28 Apr 2010, James Y Knight wrote: > On Apr 27, 2010, at 10:33 PM, Daniel Herring wrote: > >> The attached patch fixes an obscure defstruct bug. See the example in the >> commit message. I am working on adding a proper test to >> tests/defstruct.impure.lisp (help appreciated). > > It does seem reasonable to expect that specifying a type of vector for the > defstruct actually results in a check for the type vector rather than > something else. > > It might be nice, however, to also allow users to specify other > vector-subclasses as the type argument to defstruct. I do note that CLHS > explicitly allows implementations to support additional types. > > It seems pretty sane to allow someone to write: > (defstruct (test (:type simple-vector))) > or > (defstruct (test (:type (simple-array fixnum (*))))) > if that's what they want. Agree wholeheartedly, but I don't have the time to add these. Apparently, a precursor of CL supported something like (:type tree) which resulted in the use of cons trees. - Daniel |