2 ms·
I doubt it. All Node.js libraries are built around the non-blocking model which is why it works so well. Python libraries will have to decide if they're a norma
by mayhew 13y ago
I doubt it. All Node.js libraries are built around the non-blocking model which is why it works so well. Python libraries will have to decide if they're a normal blocking library or an async one. Possibly maintain both versions of the API?
Personally I'm not convinced that the Node.js callback hell is a good way to get high IO performance. The Golang way of doing it with normal, blocking libraries and Goroutine's seems ideal as it doesn't burden the programmer as much.
- spion 13y agoCallback 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.