[cdr-discuss] Three RFCs

Gary King gwking at metabang.com
Tue Mar 18 00:26:17 UTC 2008


>> 1. Support a :TEST arg for (E)CASE.
>
> I'm not sure what this buys you over a regular cond. Case primarily  
> exists for efficiency, no?

Hi Pascal, I see your point _but_ there is also something to be said  
for efficiency of human code reading and code writing, no? I'd say  
that case variants let the reader know that all of the tests are of  
the form "this" is the same as "that" for some notion of "same as" and  
various "that"s.

(case <this>
   (that-1 ...)
   (that-2 ...)
   ...)

whereas cond is saying, do an arbitrary test for each possible branch...

This may not be enough to argue for adding to  / extending case...

cent, cent,
--
Gary Warren King, metabang.com
Cell: (413) 559 8738
Fax: (206) 338-4052
gwkkwg on Skype * garethsan on AIM







More information about the cdr-discuss mailing list