Forbid implementations from extending the RegExp grammar.
C. Scott Ananian
ecmascript at cscott.net
Mon Jul 6 14:03:09 UTC 2015
I think it would be more worthwhile of we tried to draw a compatibility
boundary. Taking perlre as a baseline, for example, are there additional
characters we should escape in `RegExp.escape` so that implementations (and
the language itself) could add more perlre features without breaking
compatibility? The `(?...)` syntax (and flags) seems to be the de facto
extension point, can we protect that more narrowly?
On Jul 6, 2015 1:56 AM, "Benjamin Gruenbaum" <benjamingr at gmail.com> wrote:
> So, following work on RegExp.escape  I found out that implementations
> asking esdiscuss and Stack Overflow about it  it doesn't look like
> any implementations currently do so (*).
> 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.
>  https://github.com/benjamingr/RegExp.escape
> (*) some did it to implement ES2015 features before ES2015.
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss