[r6rs-discuss] Use backquote in "case"

Abdulaziz Ghuloum aghuloum at cs.indiana.edu
Fri Nov 10 12:14:27 EST 2006


On Nov 10, 2006, at 4:28 AM, Stanislav Ievlev wrote:

>> If "case" were defined in terms of backquote, though, this would be
>> possible:
>>
>> (define some-const 'xxx)
>>
>> (case some-val
>>         [(,some-const)
>>                 ...])
> It's a too dangerous. We should avoid an implicit evaluation.

What implicit evaluation?  The unquote here, just like the one in 
quasiquote, is explicitly saying "evaluate this".
There might be other issues regarding when things are evaluated.  For 
example, are the following two expressions equivalent:
   (case e0 [(constant ,e1) e2] [else e3])
   (case e0 [(,e1 constant) e2] [else e3])

Aziz,,,




More information about the r6rs-discuss mailing list