Folks,

I was looking at few things today in Bugzilla, one of them is <https://bugzilla.mozilla.org/show_bug.cgi?id=519933 >. The gist of it is that Rhino CVS HEAD code now conforms to TC39 ES3.1 Draft of 9-Feb-2009, 8.12.4, step 2 and will throw a TypeError when assigning to a property that has a getter but has no setter. However, this was not really prohibited by earlier versions of either ECMAScript or JavaScript. Rhino itself doesn't only support ECMAScript 5, it actually supports a whole range of JavaScript versions (and, FWIW, ECMAScript 5 will only be used in JavaScript 2.0).

This brings about a question about the identity of the project. What does Rhino strive to be? Do we want to be an ECMAScript runtime, or a JavaScript runtime? What versions of ECMAScript and JavaScript do we want to support with each release?

I believe that Rhino should be a JavaScript runtime, that is, not a purely ECMAScript runtime, but also incorporating JavaScript features as documented at <https://developer.mozilla.org/en/JavaScript>

As for version support... Rhino now has an awful lot of backwards compatibility switches in it, and I'm a bit worried about maintaining all of them.

Now, what version of JavaScript do we want to support? Right now, Rhino has a bunch of VERSION_x_y constants that allow it to run in older JS runtime compatibility mode. How far in the past do we want to support that? Do we want Rhino to support a range of older JavaScript versions, or do we declare that we will support whatever is the latest JavaScript version, and tell people who need older JavaScript functionality that they should go and use an older Rhino version?

I think we should be consistent about this. Current CVS HEAD seems to have ECMAScript 5 functionality enabled by default (including the above mentioned TypeError on setting a property with a getter but no setter) that will ruin compatibility with previous JavaScript versions. We either want every such functionality to be conditional on, say, VERSION_2_0 (since JS 2.0 will be the ECMAScript 5 compliant JS), or we should just throw away the compatibility idea and say that going forward, we're only supporting a single JS version.


Attila.

_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to