Oliver Hunt (2013-08-29T16:24:32.000Z)
domenic at domenicdenicola.com (2013-09-08T00:21:38.631Z)
On Aug 29, 2013, at 1:13 AM, Brendan Eich <brendan at mozilla.com> wrote: > The design decision to face is what to do when a global regexp is used. Throw, or ignore its lastIndex? I would favor ignoring lastIndex rather than throwing, but to be sure can you clarify what you mean by global regexp? If we're talking /.../g, then my feeling is that the /g should be ignored -- if you're wanting a regexp iterator for a string (or whatever) I would think that the API would imply that all regexps were intended to be "global". If we're talking about multiple concurrent iterators with the same regexp/string then it should definitely be ignored :D Erm. I'm not sure if that's coherent, but the TLDR is that I favor ignoring all the old side state warts (i would not have iterators update the magic $ properties, etc)