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

Re: Issue: ALIST-NIL (Version 1)



    Date: 22 Jun 88 22:56 PDT
    From: masinter.pa@Xerox.COM

    of all of the odd little confusing corners of CL, this seems like one of the
    least important to clean up. 

i don't know what your criterion for importance is. there was a lot of mail
a while back that exposed widespread confusion about whether even arbitrary
symbols could occur in an alist. this was traced to confusion over the need
to mention atoms in one paragraph forced by the mention elsewhere of nil as
a possible alist element.

i continue to believe that the proper metric of importance is the set of things
which people think important enough to bother mentioning. even if there seem
to be a thousand things of similar kind in the language, the fact that the
complainants do not mention the other 999 is an appropriate way of rank ordering
the one against the other 999.

in this case, confusion over what can go in alists was already on my list of
problems from macsyma days. it came up again on the common-lisp mailing list.
and it came up again when i was looking at the standard this time around.
i consider this reason enough for the issue to go to committee vote unless
someone can advance a sound technical argument as to why nils should be allowed.

    I would imagine the intent was more along the lines of your #2; and that
    putting NIL there seems simpler than putting some otherwise useless CONS.

on the other hand, i have never seen this done in practice so it may have been
useless optimization.

    Besides, putting the NIL there also makes it clear where
    the "dummy" entries are, allowing for a quick (remove nil alist).

well, if your only purpose was to do a remove later, you could often just
put :DELETED there and be sure to clean up the alist when you were done,
or else just do the real splicing as you went.

    So, I'm agin it.

i'll add your no vote on the next revision.