3 ms·
I personally prefer async/await over callbacks or promises. I find the flow better when I can make an Ajax call just await the result, rather than having to imp
by ThunderSizzle 5y ago
I personally prefer async/await over callbacks or promises. I find the flow better when I can make an Ajax call just await the result, rather than having to implement a success function.
- paskozdilar 5y agoThe "lightweight thread" alternative would probably make the Ajax call blocking, so you could just launch a thread that waits for it to finish, then continues on with the rest of its instructions. The "callback hell" wouldn't exist in the first place. This is exactly what Golang did, and in my honest opinion, it's a breeze of fresh air in the modern mess of processes/threads/asyncawaitcoroutines and all their combinations.