back

by danabramov·12y ago·view on hn ↗
What about generators and stuff like Koa[1]? Do you dismiss them too? You don't have to use events all the time, and it's trivial to wrap most Node IO as promises, thunks or whatever it is that you like, and then use generators as syntax sugar to work with them.

[1]: http://koajs.com

1 comments
Still incredible hacks compared to a language that just does it right, you get composition problems with having so many techniques floating around that require adapters to work with each other, and you're still writing a ton of code that is simply paperwork, that the compiler could be doing instead. And it's nasty, error-prone paperwork too.

Remember, Node did not originate a single one of those techniques, despite what it sometimes sounds like. They're rediscovering them from the other communities that tried them, and subsequently discovered that the techniques did not solve their concurrency problems. Watching the Node community has been like watching the greater concurrency community's last 40 years compressed into 4 years; we are right on the verge of the inevitable recognition that these techniques won't save them either (I'm seeing the first traces of this in various blog posts), followed by an eventually dimming of Node's vitality as it slowly becomes clear that Javascript just can't do what Node is asking it to do, at scale. (Can not emphasize the "at scale" enough. Anything works on small cases. Node is good enough to work at medium cases, though the effort starts getting greater distressingly fast, which is only noticed by those who have worked in a saner environment. But it's just not going to work at scale any more than any of the other half-a-dozen virtually identical languages with virtually identical capabilities and virtually identical programmers.)