Hacker News new | past | comments | ask | show | jobs | submit login

I never understood why this is necessary. Using promises means you get to use try-with-resources style construct for handling non-memory resources safely. As such you no longer need to crash on uncaught errors, except errors pertaining to resource disposal.



i think the reason is that, in my example of networking, the network i/o is an "interupt" kind of event, that is triggered outside of normal execution. like if there's a socket timeout.

probably didn't have to be designed this way, but it was designed pre-promises and I guess they are lothe to change it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: