[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CASEQ doesn't do MEMQ
- To: GJC at MIT-MC
- Subject: CASEQ doesn't do MEMQ
- From: KMP at MIT-MC (Kent M. Pitman)
- Date: Sat, 4 Apr 81 21:21:00 GMT
- Cc: (BUG LISP) at MIT-MC
- Original-date: 4 APR 1981 1621-EST
It would be even more confusing than it already is if it did MEMQ.
Eg, CASEQ allows the form
(CASEQ q ((item1) consequent) ...)
to contract to
(CASEQ q (item1 consequent) ...)
except in the case of item1=T, where (CASEQ ... (T ...)) has special
meaning and hence if you want to compare to T you have to do
(CASEQ ... ((T) ...)). If you allowed arbitrary things to compare against,
(CASEQ '(FOO BAR) ((FOO BAR) X) (((FOO BAR) Y) XX) ...)
and you'd have even more special cases to worry about.
As with the recent discussion with DOLIST, I Have to say that I think the
right thing is simplicity. While perhaps CASEQ should allow any kind of atomic
things, I don't buy its accepting arbitrary forms. That destroys the sense of
simplicity it meant to achieve. If its syntax gets so hairy that you
can't see what it is doing at a glance, you oughta be using COND or
write your own GCASEQ, I think.
ps As a side note, (CASEQ '(FOO BAR) '((X) 8)) reads in as
(CASEQ '(FOO BAR) (QUOTE ((X) 8)))
so I suspect you didn't mean the second "'" in your example.