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

Re: Why <empty-list> and <pair>? or More heresy...



/// From: Jonathan Bachrach <Jonathan.Bachrach@ircam.fr>
/// Subject: Why <empty-list> and <pair>? or More heresy...
///
/// [...stuff deleted...]
///
/// It could even be argued that #F should also be used as the bottom
/// value for <list>.  It seems that the real reason to want to use '() is
/// so that people can `cdr' and `car' it without first checking and that

Gack!  Grand Heretic that I am, I don't want to see Dylan have NIL!  This would
be to parallel one of LISP's grand mistakes by not providing a proper bottom
list distinguishable from false...

I do agree that (singleton '()) seems more in keeping with the rest of the
specification, though.

///         (instance? '() <list>) => #T
/// 
/// thereby making declarations easier or no need to resort to
/// 
///         (or (singleton #F) <list>)
/// 
/// I like these efficiency features, but if people want symmetry, then
/// one might consider using #F instead of '().

It doesn't seem that efficient to me.  Anyway, isn't '() considered a <list>?
I think <list> is an abstract class from which both <empty-list> and <pair>
inherit.  This is reason enough for me to want to leave <list>, <empty-list>
and <pair> -- different classes for different underlying representations seems
natural...

/// I actually still prefer automatic void values (changed the name to
/// avoid collision with the usual connotations of bottom value), where
/// the void value is an instance of the class and could be customized to
/// have special properties for efficiency (such as '()).  Programs can
/// access the void value and use it for singleton dispatching.  This
/// makes the use of a void value (such as '()) both efficient and
/// symmetrical.

We're not going to get them.  Let's move on.

	-- Scot