[cdr-discuss] Three RFCs

Leslie P. Polzer leslie.polzer at gmx.net
Tue Mar 18 09:46:09 UTC 2008


Hello Pascal,

thanks for your comments.

>> 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?

Clarity of semantics. As Gary already pointed out somewhat,
COND models “branch according to arbitrary predicates”,
while CASE models “branch according to equality of a variable
binding”.

But an extended CASE would also, by way of this semantical difference,
extend the efficiency by letting the compiler optimize it (e.g.
via hash tables). This is hardly possible with a COND).


> It would indeed be good if it were standardized what the ` , and ,@
> expand into. However, this should take into account current practice,
> so would need an analysis stage first, I think. This sounds like hard
> work (but maybe I'm overestimating this).

Why do you think so?


>> 3. Support extended feature tests. It would be nice to be able to say
>>   +(find-package 'zoo)(...)
>
> I don't think that's a good idea because it changes the semantics of
> boolean expressions. (when :some-keyword (print 'foo)) will always
> print 'foo, whereas #+some-keyword (print 'foo) prints 'foo only
> if :some-keyword is on the feature list. In other words, this may lead
> to some unexpected results.

Yeah, let's scrap #3.

  Leslie




More information about the cdr-discuss mailing list