And if you really want panics in your JS, do `process.exit(1)`.
-
-
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 -
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
@domenic @tjholowaychuk I know that; I wasn't around when that happened. Throw had been panic for as long as *I* have done JS
-
-
Replying to @yoshuawuyts
@yoshuawuyts@tjholowaychuk well not much the TC can do about people using a language feature already designed and shipping in weird ways.0 replies 0 retweets 0 likesThanks. 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.