Holy crap Swift's async/await proposal using delimited continuation-style control flow:https://gist.github.com/lattner/429b9070918248274f25b714dcfc7619#entering-and-leaving-async-code …
-
-
Replying to @jlongster
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`.
1 reply 0 retweets 9 likes -
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
You only have those kinds of problems in languages that allow it. I'm sure Java has tons of potential inconsistent state, not JS tho
1 reply 0 retweets 0 likes
The problems come from programmers not having a good way to reason about what operations can be interrupted.
-
-
They're not about Java. JS has insane amounts of corruptible state, but it's managed well with run to completion.
0 replies 0 retweets 1 likeThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.