[cdr-discuss] Three RFCs

Pascal Costanza pc at p-cos.net
Tue Mar 18 11:37:53 UTC 2008


On 18 Mar 2008, at 12:16, Edi Weitz wrote:

> On Tue, 18 Mar 2008 11:08:45 +0100 (CET), "Leslie P. Polzer" <leslie.polzer at gmx.net 
> > wrote:
>
>>> (my-case (thing :test 'foo)
>>> (<case1> <form1>)
>>> ...
>>> )
>>
>> Yes, something like that.  Of course, the best solution would
>> consist of being able to say just
>>
>> (case thing :test #'equal
>> (<case1> <form1>)
>> (...))
>
> Why "of course"?  If you think that brevity is the most important
> thing and parentheses have to be avoided at any cost, then maybe.
> Other than that, I think that
>
> (case (thing :test 'foo)
>   (etc...
>
> is easier to understand and read.


...but that's ambiguous:

(defun thing (&key test)
  (declare (ignore test))
  42)

(defvar thing 4711)

(case (thing :test #'=)
  (42 'foo)
  (4711 'bar))

What's the result of that form?


Pascal

-- 
1st European Lisp Symposium (ELS'08)
http://prog.vub.ac.be/~pcostanza/els08/

Pascal Costanza, mailto:pc at p-cos.net, http://p-cos.net
Vrije Universiteit Brussel, Programming Technology Lab
Pleinlaan 2, B-1050 Brussel, Belgium








More information about the cdr-discuss mailing list