4 ms·
Callback hell isn't, but promises do help (to a point) In 0.12, node will ship with a version of v8 which has generators (hidden under the --harmony flag), whi
by spion 13y ago
Callback hell isn't, but promises do help (to a point)
In 0.12, node will ship with a version of v8 which has generators (hidden under the --harmony flag), which are shallow coroutines, which allow for the same code style as go-routines.
Existing non-blocking libraries will be reusable with generators via e.g. https://github.com/jmar777/suspend https://github.com/jmar777/suspend or https://github.com/visionmedia/co https://github.com/visionmedia/co etc.
Performance could also potentially improve as in V8 closures are much more expensive than generators.