Forbid implementations from extending the RegExp grammar.
allen at wirfs-brock.com
Mon Jul 6 19:23:23 UTC 2015
On Jul 5, 2015, at 10:56 PM, Benjamin Gruenbaum wrote:
Actually, almost all ES implementation extend/modify the ES RegExp pattern grammar. Annex B.1.4 http://ecma-international.org/ecma-262/6.0/#sec-regular-expressions-patterns attempts to describe the interoperable RegExp extensions that are common among browsers.
> Can we please forbid implementations from extending the regular expression syntax? It seems like this could cause compatibility issues between implementations anyway. We have subclassable RegExp with hooks and symbols in place and implementations that want to provide an extended RegExp can subclass RegExp or propose an extension to the language itself.
Can't do it, won't work. If followed, a general probation of syntactic extensions, whether for the entire language or just for RegExp patterns,would block all future language innovation. But, it practice it would just be ignored.
We (think) we can get away with a few very targeted and well motivated extension prohibitions such a those listed in http://ecma-international.org/ecma-262/6.0/#sec-forbidden-extensions but broad a "no new syntax" prohibition would hold and isn't desirable.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss