3 ms·
I disagree on both fronts. Languages should provide primitive constructs and allow libraries and frameworks to sort out the rest. It is nearly impossible to c
by kansface 12y ago
I disagree on both fronts. Languages should provide primitive constructs and allow libraries and frameworks to sort out the rest. It is nearly impossible to change a language after the fact, but libraries are free to come and go.
The bane of JS really isn't async programming- it is branching async logic and this is exactly the problem that generators will solve. Moreover, libraries can choose to wrap them into callbacks so they will be backwards compatible.
To get an idea of what this will look like, check out this library I wrote for Luvit (Nodejs for Lua) which relies on callbacks and coroutines to make async code look sync.
https://github.com/kans/luvit-inlineCallbacks https://github.com/kans/luvit-inlineCallbacks