I wanted to mention the global state of regexs prevent the elimination of
otherwise dead code by optimizers.  Which is unfortunate. I personally have
fixed a number of bugs where a regex overwrote the global state.  It is a
refactoring hazard.
On Sep 17, 2014 8:58 PM, "Viktor Mukhachev" <[email protected]> wrote:

>
> `lastIndex` also prevents usage of one instance in parallel...
> I know the javascript do not support parallel execution, but the code is
> not so beatiful...
>
> the idea to "deprecate" lastIndex was proposed 4 years ago:
>
> see
> http://blog.stevenlevithan.com/archives/fixing-javascript-regexp
>
> http://esdiscuss.org/topic/proposal-for-exact-matching-and-matching-at-a-position-in-regexp
>
> _______________________________________________
> 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

Reply via email to