[r6rs-discuss] [Formal] eliminate library export immutability loophole

Abdulaziz Ghuloum aghuloum at cs.indiana.edu
Mon Mar 12 05:02:34 EDT 2007


On Mar 11, 2007, at 11:47 PM, R. Kent Dybvig wrote:

>> Assuming this comes to pass, do you have a precise semantics in mind
>
> Yes.  Instead of expanding a library body into the equivalent of:
>
>   (letrec* ((var rhs-expr) ...) body-expr ... (unspecified))
>
> we would expand it instead into the equivalent of:
>
>   (letrec* ((var (once-only rhs-expr)) ...) body-expr ...  
> (unspecified))
>
> where (once-only e) raises an exception if e returns more than once.

I'm thinking that the "once-only" restriction should apply to top-level
definitions and expressions as well.  Am I correct?

Aziz,,,



More information about the r6rs-discuss mailing list