> Le 27 avr. 2016 à 15:46, Andrea Giammarchi <[email protected]> a 
> écrit :
> 
> What I am saying is that `class MyRE extends RegExp {}` should *not* inherit 
> any magic property from global `RegExp` but *also* should *not* pollute the 
> global `RegExp` when used.
> 
> Right now, the code I've tested on Chrome, suffers pollution either ways: 
> `MyRE.$1` is `RegExp.$1` and vice versa, even if I'm using `new MyRE()` when 
> testing or matching my own regular expressions.
> 
> Having same features improved on the global pollution side looks like a 
> better win than removing features one might or not like.
> 
> Best Regards

Right. I have just amended my proposal so that MyRE.$1 is undefined by default.

In the same time, I have simplified the semantics: more precisely, I have 
removed attempts to be smart that resulted in being more risky w.r.t backward 
compatibility. It is more important to have something that is agreed to be 
implemented.

—Claude
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to