Re:Asynchronous programming and cooperative multitasking
by simcop2387 on Sunday February 10, 2019 @04:23AM
(#19127041)
They're a step towards it, but they don't really solve the callback after callback on their own. You need something like a ->get() or await on them to be able to serialize the flow of things to completely solve that.
But that encapsulation of success or failure does do wonders for helping the swallowing of exceptions, by basically wrapping the async operation in a try/catch that carries it over for you.
Re:Asynchronous programming and cooperative multitasking
by luminousmen on Sunday February 10, 2019 @04:26AM
(#19127050)
"callbacks swallow exceptions" - I guess you're right, but I'm talking not only about JS implementation here. I'll delete it to generalize
"callback after callback gets confusing and hard to debug" - I think it is true even for mature developers
Odd that they weren't mentioned.