Practically I think that means async/await can capture more than just one frame on the stack. Thus it's not just a simple shallow `yield`.
-
-
Replying to @jlongster
The shallow yield is a feature not a bug. It permits a great deal of local reasons for a relative low cost.
2 replies 0 retweets 1 like -
Replying to @wycats @jlongster
There's a great post by
@littlecalculist on this from 2011:http://calculist.org/blog/2011/12/14/why-coroutines-wont-work-on-the-web/ …3 replies 0 retweets 6 likes -
Replying to @wycats @littlecalculist
But there lots of really cool things you can do with delimited continuations. Algebraic effects, for ex. mayb harder to understand, but good
1 reply 0 retweets 0 likes -
Replying to @jlongster @littlecalculist
What kind of algebraic effects can you do with delimited continuations that you can't do with generators that are worth the hit to reasoning
2 replies 0 retweets 0 likes -
Replying to @wycats @littlecalculist
Ones which can abort execution no matter what has been called (so it interops with all existing libs)
1 reply 0 retweets 0 likes -
Replying to @jlongster @littlecalculist
How can you effectively abort execution without introducing these problems: http://docs.oracle.com/javase/6/docs/technotes/guides/concurrency/threadPrimitiveDeprecation.html …
3 replies 0 retweets 0 likes -
Replying to @wycats @littlecalculist
They key being that a function can't be arbitrarily interrupted. Only at the function call boundary. Anything that could get in an...
1 reply 0 retweets 0 likes -
inconsistent state could just as well with `await` of the same call. Delimited continuations do usually come with primitives...
2 replies 0 retweets 0 likes -
Replying to @jlongster @littlecalculist
Function boundaries aren't so good: let depth = 0; function render(c) { depth++; exec(() => c.render()); depth--; }
2 replies 0 retweets 0 likes
Think about functions like forEach which are expected to be executed synchronously.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.