[E-Lang] E Project, Documentation, and new programmers
Mark S. Miller
markm@caplet.com
Thu, 12 Apr 2001 11:26:26 -0700
At 11:01 AM Thursday 4/12/01, Dan Bornstein wrote:
>[...] "return" [...] "throw," and if you squint your eyes just right you can implement
>the former in terms of the latter [...]
>If you bundle the return value into the Throwable (e.g., make a
>ReturnThrowable that has a performReturn() method which sets some internal
>state and does the throw, and the catch extracts the return value), then
>you're about 80% of the way towards having full downward-passing
>continuations, something I'd be very much in favor of.
It's a shame our responses to Tyler crossed in the mail. I think you're
recapitulating E's existing escape expression
http://www.erights.org/elang/kernel/EscapeExpr.html , and its implementation
in Java using Ejector and Ejection. The "escape" expression is the moral
equivalent of Scheme's "call/cc", except that the Ejector it creates and
binds is a dynamic-extent, rather than an indefinite-extent, continuation.
I'd guess this distinction is what you mean by "downward-passing".
Cheers,
--MarkM