[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue: LIST-TYPE-SPECIFIER (Version 1)
- To: Rob.MacLachlan@WB1.CS.CMU.EDU
- Subject: Re: Issue: LIST-TYPE-SPECIFIER (Version 1)
- From: masinter.pa@Xerox.COM
- Date: 5 Oct 88 01:06 PDT
- Cc: Eric Benson <eb@lucid.com>, masinter.pa@Xerox.COM, BECKERLE@XX.LCS.MIT.EDU, cl-cleanup@sail.stanford.edu
- In-reply-to: Rob.MacLachlan@WB1.CS.CMU.EDU's message of Sun, 18 Sep 88 11:09:11 EDT
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.