Re:Node.js is Backwards
by skybrian on Monday June 13, 2011 @07:22PM
(#2651135)
Sure, it's the reverse of goroutines, which allow you to do easy asynchronous programming using synchronous code.
[ Parent
| on HN ]
.. or erlang processes. Or python greenlets. Or Haskell forkIO threads. Or libcoroutines.. Etc.
Erlang has a slightly different but largely equivalent model, but the other alternatives you mention lack Go's channels and/or the select construct which is one of the greatest things about the language.
When I found that Stackless Python didn't have a way to read/write on multiple channels at once I was quite shocked.
How's that Haskell lacks channels?
http://hackage.haskell.org/packages/archive/stm/2.1.1.2/doc/...
http://www.haskell.org/ghc/docs/7.0.2/html/libraries/base-4....
It also looks that "select" statement could be done in a combinator library way.
The power of Haskell (or of any proper modern language) isn't in the language itself, it's in the number of things you can express as a library, on top of the language.