News for hackers. Stuff that matters.
Re:Why node.js disappoints me by exit on Monday September 27, 2010 @02:47PM (#1732844)
do you think it's worth fixing deeper stuff, like arrays of numbers being lexically sorted?
Re:Why node.js disappoints me by jashkenas on Monday September 27, 2010 @03:28PM (#1733000)
There are lots of things that it would be wonderful to fix, but can't be done without either patching native objects, running an interpreter on top of JS, or adding lots of special functions in a required library.

Take, for example, negative array indices. It would be lovely if JS allowed you to say:

    array[-1]
As an alias for

    array[array.length - 1]
Unfortunately, we can't add the feature because you'd have to intercept "[]" at every call site. For example:

    a[b]
Is a an array or an object? Is b a string or a number, and if so, is it negative? You just don't know at compile time, so we don't support the feature. This is just one example of something that would be nice to fix about JS, but can't be done cleanly -- there are plenty of others.
Re:Why node.js disappoints me by exit on Monday September 27, 2010 @04:43PM (#1733330)
fair enough. i suppose ultimately the browser just needs a neutral vm.