4 ms·
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 su
by spion 7y ago
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.
- novaleaf 7y agoi 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.