[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
compromise
Coversations at POPL clarified that our proposal to "prompt"
declaration expressions is too strong to be acceptable for the Scheme
community in time for the 4th revision of RRS. Chris Haynes pointed to
a possible compromise, which would add the following clause to the
sub-sections on DEFINE and LETREC. The expansion of LETREC is a fixed
version of Feeley's code.
% --------------------------------------------------------------
Subsection 4.2.2 (on letrec):
-----------------------------
"Warning: It is an error to grab the continuation during the
evaluation of <expression>."
Subsection 5.2 (on define):
---------------------------
"Warning: It is an error to grab the continuation during the
evaluation of <init>."
Subsection 7.3 (on letrec):
---------------------------
(letrec ((var1 val1) ...) body)
==
(let ((var1 #f) ...)
(let ((thunk (lambda () val1)) (hasnt-returned-yet? #t))
(let ((result (thunk)))
(if hasnt-returned-yet?
(begin
(set! hasnt-returned-yet? #f)
(set! var1 result))
(error "It is an error to call such continuations"))))
...
body)
-- Bruce & Matthias