> Here is a modification to library L1 that gets around
> the above "loophole fix":
>
>   (library (L1)
>     (export y get-y set-y!)
>     (import (r6rs))
>     (define x #f)
>     (define y (car x))
>     (define z ((caddr x)))
>     (define get-y (lambda () y))
>     (define set-y! #f)
>     (set! x (call/cc (lambda (k) (list 0 k values))))
>     (set! set-y!
>       (lambda (v)
>         (call/cc (lambda (k) ((cadr x) (list v (cadr x) k)))))))

This explicitly sets an export (set-y!), which is considered a syntax
violation.  Even if it didn't, the call to car in the fifth line of your
code would raise an exception at run time.

I don't believe there is a way around the loophole fix, i.e., any way to
alter either an exported variable or its local counterpart.

Kent

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to