AndrevanTonder wrote:
> On Thu, 22 Feb 2007, Per Bothner wrote:
>
>> (define VAR (MAC))
>> (set! VAR (MAC))
>> (list (MAC))
>> (MAC)
>> (define-syntax MAC ...)
>>
>> The first 3 (MAC) applications are deferred, so are correctly
>> done using the following the define-syntax.
>>
>> The 4th (MAC) is not deferred, and so "the wrong thing will
>> happen".
>
> Not in a correct implementation. A correct implementation should throw
> a syntax error. See section 8:
>
> "A definition in the sequence of forms must not define any identifier
> whose
> binding is used to determine the meaning of the undeferred portions
> of the
> definition or any definition that precedes it in the sequence of forms."
I'm missing something here. Is this an argument against my point?
My reading of the statement you quoted is that the first 3 forms are
valid, and the 4th should be a syntax error. I think that counts
as the "wrong thing happening".
You agree that:
(car (list (MAC))
is valid while:
(MAC)
is a syntax violation? And a user might find this surprising?
--
--Per Bothner
per_at_bothner.com http://per.bothner.com/
Received on Thu Feb 22 2007 - 18:19:42 UTC