[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why <empty-list> and <pair>? ...
- To: email@example.com
- Subject: Why <empty-list> and <pair>? ...
- From: Keith Playford <Keith.Playford@gmd.de>
- Date: Tue, 1 Dec 1992 20:50:50 +0100
- Cc: firstname.lastname@example.org
- In-reply-to: email@example.com's message of Tue, 1 Dec 1992 18:55:56 +0100 <9212011755.AA10177@thelonius.mitre.org>
> From: firstname.lastname@example.org
> Posted-Date: Tue, 01 Dec 92 12:55:56 EST
> Jonathan Bachrach (Jonathan.Bachrach%ircam.FR@princeton.edu) writes:
> All this talk of the lack of a need for <true> and <false> classes
> has made me wonder why it is necessary to have an <empty-list>
> class. Why can't people just use `(singleton '())'?
> Which is not to say that <EMPTY-LIST>, and to a lesser degree <PAIR>,
> don't have their problems. [...]
Yes, why not finally take the bull by the horns and eliminate both
<empty-list> and <pair>, leaving just <list> to fend for itself as an
instantiable sequence class? Pairs could be retained disjointly as a
special-case tuple type if felt sufficiently useful, as could improper
list notation (if _really_ necessary) but with (a . b) always being
interpreted as a list with an improper tail rather than as a pair.
If it's decided to use the class heterarchy to discriminate empty from
non-empty, then I'd much rather <non-empty-list> be used in place of
<pair> and, again, have a <pair> class defined disjointly. Defining
methods for things like mapping and shallow-copying functions on
<pair> is awful.
This list/pair hang-up is a bit of Lisp tradition I could quite
happily learn to live without.
-- Keith --