Brendan Eich wrote:
On Oct 21, 2011, at 12:49 PM, Eric Jacobs wrote:
The catch is, of course, that all code which either can yield, or can call other
functions which yield, must have the "yield" keyword there, to mark that
run-to-completion invariants will end at that point. This seems like a very reasonable
compromise to me.
If you have to yield at every point in a call chain that might reach a
coroutine that captures a deep continuation, then you've really got a chain of
shallow continuations.
/be
As a language end-user, I'm not sure that I would (or should) be
concerned about the distinction between a deep continuation and a chain
of shallow continuations. After all, the stack is just a chain of
frames, and the mechanism by which those frames are chained together is
not of semantic importance to the language.
That said, coroutinish features like having stacktraces that show
multiple levels of blocking operations, and try/catch blocks that can
catch over several blocking operations would be really nice to have. If
those features can be built at the library level using shallow
continuations or generator trampolines or what have you, I say great.
-Eric
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss