The primary advantage to making it be a function (also doing it as syntax would be great too!) is that it's polyfillable, which means that all browsers could instantly take advantage of known-safe regex escaping.
On Fri, Jun 12, 2015 at 11:34 AM, Alexander Jones <[email protected]> wrote: > At risk of bikeshed, I think I would prefer syntax for it, personally, > e.g.: > > let myRegExp = /\d+\./{arbitrary.js(expression)}/SOMETHING$/; > > (ASI issues notwithstanding) vaguely matching the idea of template > strings. I prefer this kind of thing to be structured at the parse-level > rather than relying on runtime string stitching and hoping for a valid > parse. > > Cheers > > On Friday, June 12, 2015, Benjamin Gruenaum <[email protected]> wrote: > >> Reviving this, a year passed and I think we still want this. >> >> We have even more validation than we had a year ago (added by libraries >> like lodash) and this is still useful. >> >> What would be the required steps in order to push this forward to the >> ES2016 spec? >> > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

