From ... Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!134.222.94.5!npeer.kpnqwest.net!nreader1.kpnqwest.net.POSTED!not-for-mail Newsgroups: comp.lang.lisp Subject: Re: How can i make "case" to use equal? References: <9n2ga3$4ng56$1@ID-91322.news.dfncis.de> <3208606982556119@naggum.net> Mail-Copies-To: never From: Erik Naggum Message-ID: <3208789962759722@naggum.net> Organization: Naggum Software, Oslo, Norway Lines: 14 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 06 Sep 2001 18:32:43 GMT X-Complaints-To: newsmaster@Norway.EU.net X-Trace: nreader1.kpnqwest.net 999801163 193.71.66.49 (Thu, 06 Sep 2001 20:32:43 MET DST) NNTP-Posting-Date: Thu, 06 Sep 2001 20:32:43 MET DST Xref: archiver1.google.com comp.lang.lisp:15768 * Sam Steingold > (defun case-expand (form-name test keyform clauses) > ...) > > (defmacro fcase (test keyform &body clauses) > (case-expand 'fcase test keyform clauses)) Neat, but one of the really good things about case and the like is that they can be optimized into jump tables and the like since the keys are all constants at compile-time. Expanding into cond is not a good idea if you want to keep this. In fact, using a hash table for the keys allows you to convert the keys into small integers. ///