[plt-scheme] syntax form works in top-level env, but not when imported from module.
I figured that out, but why the different behaviour?
I first tried this with a plain 'if' statement, and it
got evaluated as well. Why? Shouldn't it be so that
only the condition of an if statement must be evaluated
and the code of the part to be executed that it implies?
So
(if ('like eq 'like) ('like) (* like like))
shouldn't that be possible?
Matthias Felleisen schreef:
>
> On Nov 13, 2005, at 6:14 PM, Hans Oesterholt wrote:
>
>> (a like)
>
>
> expands into (a.is-op? 'like (lambda () (* like like))) and then is
> checked for close-ness. Since like is not defined, the module isn't
> well-formed.
>
> At the top-level, (a like) expands into the same code. But since
> module isn't there, the code isn't checked for well-formedness. So an
> unbound id is okay as long as you don't evaluate it.
>
> -- Matthias
>