Mozilla developers improve day after day Javascript. It's a good thing to improve a language. But I think those who made this improvements in Mozilla should stop smoking the carpet right now.

Improvements in javascript 1.6 (Firefox 1.5) were good, although I'm not a fan to pass a callback function to each array function. I would prefer to have a real support of array with for each statement like the foreach statement in PHP instead of to have this for each statement which return not only elements of the array, but all all the properties of the array object. However E4X was a good improvement in Javascript 1.6.

They began to do crazy things with javascript 1.7 (Firefox 2).

Generators can be useful, but conceptually, it begins to introduce some things that can be disruptive for a "normal" web developer (you know, one of these thousand of thousand web developers who made millions of web site). And it is difficult in a complex function to distinguish a normal function from a generator because the difference is only the use of this small keyword yield.

Iterator is a good thing, but I don't know why we should catch an exception to know when the iterator stops. That sucks. (Interface like PHP iterators is better IMHO).

The goal of array comprehensions is to make easy initialization of array. It would be a good thing if the syntax didn't sucks too.

var ten_squares = [i * i for (i in range(0, 10))];
var evens = [i for (i in range(0, 21)) if (i % 2 == 0)];

Sorry but it is unreadable. Good luck for those who will maintain such code. Look at this example pointed by John that we can do in Javascript 1.8 (Firefox 3):

dict([s, [u for (u in unitlist) if (u.contains(s))]] for (s in squares))

I think this is a good example of unmaintainable code. No specific keywords, no really separators. I'm sure it will be a nightmare for maintainers.

In his post, John Resig shows other things like this horrible "expression closures" feature. I don't see any advantage to write function(x) x * x instead of function(x) { return x * x; }. It is less comprehensive, less readable.

I think only nerds will play with this "features", and "normal" developers and geeks will continue to use javascript 1.5. There is an evidence : in all javascript file of Firefox 3 and other Mozilla products in the trunk, i don't find any use of let, yield or other features of Javascript 1.7.

Glazou gave me only one advantage of this new features : web/XUL developers won't have to use JS obfuscators...