- From: Tab Atkins Jr. <notifications@github.com>
- Date: Tue, 07 Mar 2017 16:06:59 -0800
- To: heycam/webidl <webidl@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 8 March 2017 00:07:31 UTC
> And to be clear, the question is what value iterators should act like when you can have repeated values and hence can't be `setlike<>`... Right, what I'm saying is that `iterator<>` *definitely doesn't* represent anything set-like, because `setlike<>` already does that (and you can't use them together). It's definitely for representing array-like iterables. Thus, there's no question of whether it should act "like a set" when iterated (for the question of what the "index" argument is for `forEach`). Whether it should have "safe" mutation during iteration is indeed a separate question, one that *happens* to map to "is like an Array" or "is like a Map/Set", but I think there's an obvious answer there too - an `iterator<>` is a light `arraylike<>` (or subclassed Array, whatever), and so for forward-compat with possible future expansion into a full array-like, it should act like Array iterators do today. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/heycam/webidl/issues/291#issuecomment-284902468
Received on Wednesday, 8 March 2017 00:07:31 UTC