[r6rs-discuss] Use backquote in "case"
On Nov 10, 2006, at 12:59 PM, MichaelL_at_frogware.com wrote:
>
>> 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])
>
> According to the spec these would be turned into:
>
> (cond [(memv e0 `(constant ,e1)) ...] ...)
> (cond [(memv e0 `(,e1 constant)) ...] ...)
>
> so I don't see how backquote would really make a difference. (In other
> words, their form is different but their effect is the same--in the
> absence of side-effects, at least. But that's another story.)
Yeah, I was just thinking of optimizations (as in: should e1 is
evaluated when needed, or should it be evaluated exactly once when the
clause is reached regardless of whether its value is actually needed or
not). Not very important really.
Aziz,,,
Received on Sat Nov 11 2006 - 01:02:38 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:00 UTC