Moving String.prototype.substr to normative part of the spec

David Bruant bruant.d at gmail.com
Fri Aug 3 11:34:06 PDT 2012


Le 03/08/2012 12:58, Allen Wirfs-Brock a écrit :
> substr is in Annex B, which in ES5.1 is an informative annex.  In ES6, the content of Annex B will be optional normative.  Required for web user agents, but optional for other hosts.
Ok. Is it planned to extend ES6-test262 scope to include tests for Annex B?

I'm wondering what's the downside of adding it in the normative part of 
the spec. It's in every browser, it's in Node.js, it's likely to be in 
MongoDB JS (I haven't tested, but it's based on SpiderMonkey 1.7, and 
soon V8), likely in all the mostly used JS platforms (which are often 
based on browser-included JS interpreters).
It's likely that platforms that support ES6 without substr will suffer 
from interoperability from libraries/modules that use it and rely on it 
and will be forced to add substr anyway.

I guess I should ask the question: Are there known and used platforms 
that do not include substr? If the answer is no, then it probably should 
get in the spec for the sake of interoperability.

David


More information about the es-discuss mailing list