Axel Rauschmayer wrote:
* /g flag must be set
* lastIndex must be 0
* can’t inline the regex, because it is needed as a pseudo-iterator (more of an anti-pattern, anyway, but still)
* side effects via lastIndex may be a problem

Anything we do of the execAll/execIter kind had better be immune to the awful Perl4-infused "mutable lastIndex state but only if global" kind. Compositionality required.

The design decision to face is what to do when a global regexp is used. Throw, or ignore its lastIndex?

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

Reply via email to