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

Re: Issue: LIST-TYPE-SPECIFIER (Version 1)



I'm confident that Michael had no intention of proposing that there be a
new type (LIST NUMBER)  of CONS whose CAR could only point to FIXNUM and
whose CDR could only point to NIL or (LIST NUMBER).

This is evident from the examples:

(typep x '(list <subtype>)) == (and (typep x 'list)
                                    (typep (car x) <subtype>))


 From a purist point of view, it might be deplorable that (LIST NUMBER) mean
something radically different than (VECTOR NUMBER). From a practical point
of view, this might be a minor inconsistency, especially in the context of
the rest of Common Lisp. Lists are mutable and can hold any type; vectors
are only mutable in fixed ways and can hold restricted types.

While I'm mildly opposed to such a proposal on the grounds that it is not a
useful addition, I would be even more strongly opposed to a proposal to add
a LIST type designator that made LIST have the same awkward subtype
semantics that ARRAY does.