Approach of new Object methods in ES5
Peter van der Zee
ecma at qfox.nl
Fri Apr 16 07:17:36 PDT 2010
On Fri, Apr 16, 2010 at 2:28 PM, Dean Edwards <dean.edwards at gmail.com>wrote:
> On 16 April 2010 13:13, Dmitry A. Soshnikov <dmitry.soshnikov at gmail.com>
> > I think that approach used in ECMA-262-5 for new object methods
> contradicts ES nature.
Indeed. The inconsistency and "hacks" is what drives me away from PHP.
I would prefer going by version and having the programmer specify the
version somehow. Perhaps like a directive.
- You can preserve backwards compat without allowing the inconsistency
issues that PHP suffers from.
- If you didn't add the directive, you probably didn't use any features for
which you required a directive
- Browsers would have to support multiple implementations to preserve
backwards compat. This con might not be that big a deal looking at the
release frequency of the ecma spec :)
- Coders would have to know about such a directive, they're not used to
requesting a specific version
- What would be the "default" version when no version was requested...
I'm interested whether there are any other alternatives. I'm expecting this
to be shot down, hard ;)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss