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

Do you have pointers for that? That really surprises me, as the two are essentially equivalent, except that function closures as in Node introduce a new, restartable (usually an unwanted/unexpected featture) scope, and coroutines maintain the same scope.

Thread safety problems are all about data changing in between your statements due to some other threads. Coroutines make that happen only along calls to other routines, which is very disciplined.



By the way, node is built on V8. I get the impression that Ryan is not at all interested in inventing a new language. He is interested in a language that runs quickly. Anything outside of the scope of JS run on V8 inches into the "new language" designation. Basically, any syntax you couldn't use in the browser is a no-no.

Note: this is just my impression.


Lua under LuaJIT2 is way faster, _and_ has real coroutines. Shame about the browser requirement.


I've gotta run. So, I can't verify that this is really a pointer... but this summary

http://newsgroups.derkeiler.com/Archive/Comp/comp.lang.javas...

about this video

http://developer.yahoo.com/yui/theater/video.php?v=dahl-node

mentions "He's also agains the use of co-routines because they're too hard"




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: