New javascript coming!
In case you missed it, the near-future of javascript was decided recently. Basically what happened is that the big changes we’ve been hearing about for Ecma4 (the best know flavor of which is being developed under the name JavaScript2) have been scrapped.
Microsoft has strong-armed the committee into scaling back the ambitions of the language. The new version is called ECMA script 3.1, and most of it’s features are already available in Firefox. Now standard are getters and setters, the JS1.6 Array methods, generators, and generics.
I was worried about ECMA4 engines running old javascript code, and I really like the extentisons to ECMA3 that mozilla has added on. I think this is a win-win situaiton for almost everyone. Firefox’s JS is pretty good now.
Many of the features of 4.0 were proposed before many programmers seriously looked at what JS could do. Now we are using constructor/proto hybrids as classes, Objects as namespaces and packages, and have figured out private variables.
Let’s not rush into 4.0 without considering:
- the effect on existing code and libraries
- the practical need for all of it’s proposed features
- how soon we can deploy 90%+ browser coverage
- the complexity for new (not coming from C++) coders