[racket] Macro example in Racket Guide

From: Jon Rafkind (rafkind at cs.utah.edu)
Date: Mon Jun 4 23:50:07 EDT 2012

On 06/04/2012 09:48 PM, Eli Barzilay wrote:
> A few minutes ago, Jon Rafkind wrote:
>> Also that example is somewhat bizarre.. I think the (clock a ...)
>> template should be (get-clock) instead of ((get-clock) a ...),
>> right?
> No -- with that change you get a weird identifier macro where
>
>   clock
>
> evaluates to (for example) 0, and
>
>   (clock 1 2 3)
>
> evaluates to 0 too.  Using ((get-clock) a ...) makes the latter throw
> an error which makes it behave uniformly.
>

Well whats bizarre about it is (clock 1 2 3) should really be a syntax error, but its converted into a runtime error instead.

Posted on the users mailing list.