News for hackers. Stuff that matters.
Re:Node.js on mozilla spidermonkey by ivank on Thursday April 21, 2011 @06:11AM (#2470017)
I don't know if this is their motivation for it, but SpiderMonkey implements many useful non-standard features, including generators and iterators.

JS 1.5: https://developer.mozilla.org/en/JavaScript/New_in_JavaScrip...

JS 1.6: https://developer.mozilla.org/en/JavaScript/New_in_JavaScrip...

JS 1.7: https://developer.mozilla.org/en/JavaScript/New_in_JavaScrip... <- generators, iterators, and more

JS 1.8: https://developer.mozilla.org/en/JavaScript/New_in_JavaScrip...

(As a side note, I once implemented Twisted's inlineCallbacks in JS 1.7; this worked because it had those Python-like generators. Too bad it doesn't work anywhere but SpiderMonkey.)

Re:Node.js on mozilla spidermonkey by pcwalton on Thursday April 21, 2011 @10:46AM (#2470782)
Those features are a lot of the reason for it, yes. As a cool example of what can be done with generators, check out my colleague Dave Herman's task.js library: https://github.com/dherman/taskjs

That library gives you coroutine-style I/O on top of node.js primitives, which is, as far as I can tell, the #1 feature people have been asking for all along in Node. It only works if node.js implements coroutines (which Ryan has so far refused to do) or if the language implements generators (which you get with SpiderMonkey).