this makes me very happy. do-expressions could be one of the best features to come to JS since ES5:https://twitter.com/BrendanEich/status/808684436665602048 …
-
-
Replying to @getify
@BrendanEich@kentcdodds@andrewingram@wycats@littlecalculist I don't understand what they are. Any example?2 replies 0 retweets 0 likes -
Replying to @ArnaudRinquin @BrendanEich and
res = do { http://any.statement.here ; };
1 reply 0 retweets 4 likes -
Replying to @getify @ArnaudRinquin and
it's scope block that acts like an expr instead of statement
2 replies 0 retweets 4 likes -
Replying to @getify @ArnaudRinquin and
it's an IIFE without the bolierplate or this/argument munging
2 replies 1 retweet 6 likes -
Replying to @getify @ArnaudRinquin and
it also allows control flow like break/continue/return.
4 replies 0 retweets 7 likes -
Replying to @wycats @littlecalculist
Huh I thought it would be more like Haskell's do and do monady things with async/await.
1 reply 0 retweets 0 likes -
Would await inside do make the whole do block evaluate to a promise?
1 reply 0 retweets 0 likes
Replying to @ManishEarth @littlecalculist
let p = async do { await x; await y; } waits for the whole thing to complete.
10:28 AM - 14 Dec 2016
1 reply
0 retweets
2 likes
-
-
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.