3 ms·
This would be wonderful, especially for people learning JavaScript. When and how to use call backs and wrangling asynchronous code propagation is a major frustr
by gerbal 12y ago
This would be wonderful, especially for people learning JavaScript. When and how to use call backs and wrangling asynchronous code propagation is a major frustration coming to JavaScript from languages that default to synchronous behavior.
- GeneralMayhem 12y agoI'm of two minds on this front. On the one hand, managing asynchronous code in JS is hard. On the other hand, managing asynchronous code in general is hard, and the only difference is that JS makes you think about what it is you're actually doing. I feel like having to make such behaviors explicit in JS has made me a better programmer in other languages because of having had to think through the timing and sequencing issues. It's just like memory management in, e.g., Java - it's not that pointers aren't there, it's just that they're mostly managed for you, and knowing how they work is beneficial to forming a better mental model.