[R6RS] Safe/unsafe mode
dyb at cs.indiana.edu
dyb at cs.indiana.edu
Thu Jul 20 22:24:39 EDT 2006
> One of the additions was:
>
> Proposal 2 requires the macro expander to pass declare
> forms through to the output, but otherwise to ignore
> their presence.
>
> This text actually appears twice; the first time, it
> should refer to Proposal 1 rather than Proposal 2.
Oops, sorry. I've fixed it now.
> One of the more obvious reasons Kent's statement is
> incorrect is that the output of the macro expander
> is wildly implementation-dependent; therefore any
> claim that any proposal must include any particular
> syntactic form within its output is incorrect, and
> obviously so.
Yet you made a similar statement in your sketch of the Proposal 3 formal
semantics.
> Another reason Kent's statement is incorrect is that
> the very same technique that Kent used to express the
> effect of implicit non-hygienic binding in Proposal 3
> can be used to express the implicit non-hygienic
> binding of the safe quality in Proposals 1 and 2.
> That is, where Kent illustrated Proposal 3 with
>
> For example,
>
> (lambda (x)
> (declare (safe 0))
> (let ((y (cdr x)))
> (declare (safe 1))
> (car y)))
>
> expands to
>
> (#u:lambda (x)
> (#u:let ((y (#u:cdr x)))
> (#s:car x)))
>
> the corresponding expansion for Proposals 1 and 2
> is to
>
> (#u:lambda (x)
> (#u:let ((y (#u:call cdr x)))
> (#s:call car x)))
>
> Obviously, there are no declare forms in this output.
Yet, again, you made a similar statement your in sketch of the Proposal 3
formal semantics.
Kent
More information about the R6RS
mailing list