4 ms·
It's not just a theoretical question about whether a particular language is capable of supporting an efficient event loop. It's also a significantly practical q
by cliffbean 13y ago
It's not just a theoretical question about whether a particular language is capable of supporting an efficient event loop. It's also a significantly practical question about whether there are a large number of libraries and community experience built up around programs organized this way.
This is also one of the big reasons why the people who wrote node.js picked JavaScript in the first place [0].
[0] http://s3.amazonaws.com/four.livejournal/20091117/jsconf.pdf http://s3.amazonaws.com/four.livejournal/20091117/jsconf.pdf
- drdaeman 13y agoAny reason large number of libraries should even know about they're using evented/async IO? I believe most of them consist of purely sequential actions (say, "connect then send then receive then process then return") and gain no benefit from non-blocking (function-wise, not program-wise) IO. If the core is smart enough to run them as coroutines (for example see Python's gevent.monkey) that yield back to event loop on waiting for IO, they'll automagically do the right thing without being infested with CPS callback ladder hell.