Holy crap Swift's async/await proposal using delimited continuation-style control flow:https://gist.github.com/lattner/429b9070918248274f25b714dcfc7619#entering-and-leaving-async-code …
How can you effectively abort execution without introducing these problems: http://docs.oracle.com/javase/6/docs/technotes/guides/concurrency/threadPrimitiveDeprecation.html …
-
-
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
-
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.
End of conversation
New conversation -
-
-
They key being that a function can't be arbitrarily interrupted. Only at the function call boundary. Anything that could get in an...
-
inconsistent state could just as well with `await` of the same call. Delimited continuations do usually come with primitives...
-
for guarding against that though ("on unwind do this") But I think you can have better abstractions where things don't get inconsistent her
-
To me the limitations of generators are rather small (being explicit when you're doing cooperative tasking), so worth the extra typing.
-
I get your point and I don't disagree. But there is a lot of proven ground that langs with del conts have and abstractions you simply...
-
can't do with gens unless you're extremely verbose. Anyway, take a look at my link, Swift's approach looks super interesting
-
I read it :) (but admittedly on my phone)
-
And admittedly I need to read it more to see how they actually take advantage of it
- 1 more reply
New conversation -
-
-
The nice thing about yield and await is that they introduce semantic points in the user's mental model where return() or throw() makes sense
Thanks. 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.