The whole point of exception handling is bubble-and-recover, vs. error codes (must check every call site) and panics (no/hard recovery).
-
-
Replying to @tjholowaychuk
@tjholowaychuk@domenic I disagree - though definitely more fragile, throw has been used as panic for as long as I can remember3 replies 0 retweets 0 likes -
Replying to @yoshuawuyts
@tjholowaychuk@domenic it serves a different purpose than process.exit; if they could be the same is not the point1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
@tjholowaychuk@domenic its easy to blame programmers for misusing the language; TC-39 says we're programming wrong1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
@tjholowaychuk@domenic instead I think the TC / promise spec authors overlooked the way throw is used; which means the spec isn't perfect2 replies 0 retweets 1 like -
Replying to @yoshuawuyts
@yoshuawuyts@tjholowaychuk I think you have a very Node-centric perspective. In the 95% of JS code that is running on the web this is wrong1 reply 0 retweets 0 likes -
Replying to @domenic
@domenic@tjholowaychuk oh yea, you're definitely right - but like I said: I think the TC overlooked the way throw is used for some, not all1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts
@yoshuawuyts@tjholowaychuk your timeline is wrong; throw/catch/finally were designed many years before Node even existed.2 replies 0 retweets 0 likes -
Replying to @domenic
@domenic@yoshuawuyts I'd probably do `let {val, err} = await fs.open(path)` and leave throw to exceptions, try/catch all over gets weird4 replies 0 retweets 1 like
@tjholowaychuk @domenic looks pretty good; quite like go - I'm not too fond of coroutines but for people that like them this would be 
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.