Subject: Re: Nil as a case key From: Erik Naggum <firstname.lastname@example.org> Date: 05 Oct 2002 13:23:30 +0000 Newsgroups: comp.lang.lisp Message-ID: <email@example.com> * Rand Sobriquet | "If there is only one key for a clause, then that key may be written | in place of a list of that key, provided that no ambiguity results. | Such a ``singleton key'' may not be nil (which is confusable with (), | a list of no keys), t, otherwise, or a cons." While it says that `nil´ is not allowed as a singleton key, it is clearly allowed as a list of no keys, since that it explicitly mentioned. | So, do you think it is correct to say that use of nil alone as a key is | not allowed? In ACL it's use is ignored, and in Lispworks it's use leads | to a warning about undefined behavior. LispWorks is wrong on this one. If you are a supported customer, complain and you will most probably receive a patch forthwith. Case keys with `()´ are important because it is often much, much easier to machine-generate (as in macros) an empty list of keys than to make the whole clause go away. -- Erik Naggum, Oslo, Norway Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.