Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Sure, it's the reverse of goroutines, which allow you to do easy asynchronous programming using synchronous code.


.. or erlang processes. Or python greenlets. Or Haskell forkIO threads. Or libcoroutines.. Etc.

See: http://news.ycombinator.com/item?id=1549023


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: