> RegExp literal expressions evaluate to mutable object values, per ES5 and 
> reality (ES3 got this wrong, making an object per literal lexeme -- not per 
> evaluated expression).

Yes, but there's no reason to assume a RegExp token would be a RegExp literal 
expression.

> Modules are static. Do we really want to drag in some of the runtime 
> (RegExps) just to filter imports? This seems not only like over-design, but 
> also the wrong design.

Import/export declarations are distinguished contexts; there's no need to 
introduce runtime evaluation. A sensible design for import/export declaration 
with a RegExp would simply be run a regular expression at compile time, with no 
ES object creation involved.

I'm not advocating the feature, but if we did include it, ISTM the benefit of 
using regexps is precisely their limited power.

Dave

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to