3 ms·
> ALSO: Your example is much slower than the same server written in Node.js, haha. Because the language doesn't support evented programming. Uhh, how do you th
by whowouldathunk 9y ago
> ALSO: Your example is much slower than the same server written in Node.js, haha. Because the language doesn't support evented programming.
Uhh, how do you think Node.js is implemented?
- EGreg 9y agoIt's not about how the bytecods is compiled. It's about the paradigms the language encourages. Look, even PHP has frameworks to do evented programming: Kraken, amphp, ReactPHP. But it lacks an ecosystem of modules that actually do things in an async way and work with the same framework. It's the ecosystem of modules and the ethos that matters.
- whowouldathunk 9y agoC++ has always supported callbacks and has libraries for promises [1] and event loops [2]. Co-routines (i.e., await) are coming soon. [1]: https://msdn.microsoft.com/en-us/library/dd492427.aspx https://msdn.microsoft.com/en-us/library/dd492427.aspx [2]: https://github.com/libuv/libuv https://github.com/libuv/libuv