Look, if you want a language with panics, use Go. If you want a language with exceptions that bubble and can be recovered from, use JS.
-
-
Replying to @domenic
And if you really want panics in your JS, do `process.exit(1)`.
4 replies 0 retweets 2 likes -
Replying to @domenic
The whole point of exception handling is bubble-and-recover, vs. error codes (must check every call site) and panics (no/hard recovery).
6 replies 2 retweets 2 likes -
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
@tjholowaychuk @domenic but that is ok; it just means people using throw and callbacks won't use promises; different audience - it ok
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.