News for hackers. Stuff that matters.
Re:Why node.js disappoints me by jashkenas on Monday September 27, 2010 @04:08PM (#1733169)
First -- your global-es5.js module is awesome. I frequently point folks to it for a way to bring old browsers up to speed. But at the same time, if you don't include a library like it, you have to admit that there are 30 core functions in there that it's easy to depend on, and that the global-es5 implementation isn't perfectly compatible with real browser implementations, it's just very close (Object.getPrototypeOf being a good example of something you can't fix).

The other approach, and the one that Eric is lamenting, is writing lowest-common-denominator JavaScript. The problem he calls out in Node isn't that it's not possible to write cross-implementation libraries -- but that people aren't doing it. There are tons of Node libraries which could very easily run in the browser, but don't. Just browsing through NPM, here are three random ones:

http://github.com/visionmedia/lingo/

http://github.com/Marak/Faker.js/

http://github.com/past/speller/

All of those do nothing Node-specific, but use JavaScript features that aren't present in IE6, 7, and 8.

There are no comments on this comment yet.