@jaffathecake if a promise just so happens to wrap an assertion that throws, it will incorrectly catch it. It's bad.
-
-
Replying to @yoshuawuyts
@yoshuawuyts you say incorrect/bad, but I'm not sure it is, especially with async functions https://jakearchibald.com/2014/es7-async-functions/ …2 replies 0 retweets 0 likes -
Replying to @jaffathecake
@jaffathecake yeah, nah. That article does its best to make async look good. Not buying that narrative3 replies 0 retweets 0 likes -
Replying to @yoshuawuyts
@yoshuawuyts@jaffathecake +1, Every time I see "Look at how good this is with promises!" I implement with CPS + kgo, and it comes out nicer1 reply 0 retweets 0 likes -
Replying to @KoryNunn
@KoryNunn@yoshuawuyts can you show me an example of this?1 reply 0 retweets 0 likes -
Replying to @jaffathecake
@jaffathecake@yoshuawuyts Here's one i prepared earlier :) : https://gist.github.com/KoryNunn/d538a0d21eb7207df205 …2 replies 0 retweets 0 likes -
Replying to @KoryNunn
@KoryNunn@yoshuawuyts the ES7 version definitely delivers chapters in order2 replies 0 retweets 0 likes -
Replying to @jaffathecake
@KoryNunn@yoshuawuyts I don't find this anywhere near as readable as https://jakearchibald.com/2014/es7-async-functions/#this-time-with-es7-async-functions … - but could be taste1 reply 0 retweets 0 likes -
Replying to @jaffathecake
@jaffathecake@yoshuawuyts remembering it compares to the first example, not the second. I find the named tasks pretty easy to follow prsnly1 reply 0 retweets 0 likes -
Replying to @KoryNunn
@jaffathecake@yoshuawuyts Actually on second look, i don't find either promise versions readable. Hard to tell the intent with a skim.2 replies 0 retweets 0 likes
@KoryNunn @jaffathecake mixing sync with async tends to have that effect. Errbacks make it explicit for me. Though that might be habit
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.