Re: [heycam/webidl] Allow iterable objects without having to become fake arrays (or fix spec) (#325)

It used to be that there was a concept of value (as opposed to pair) iterables divorced from indexed properties in the spec.

It was removed because there weren't any use cases and the spec didn't really define its behavior very clearly.  Not only that, but there were several possible behaviors it could have defined, and it wasn't clear which one was actually desired.  Instead of having untested (and broken) complexity, that bit was removed pending actual use cases that could guide the design.  See thread starting at https://lists.w3.org/Archives/Public/public-script-coord/2015OctDec/0039.html

It looks like https://github.com/heycam/webidl/pull/72 didn't update all the parts of the SessionManager example...

Anyway, per current spec you can only use single-type `iterable<>` on something with indexed properties, but we're generally open to loosening that restriction if there are clear use cases.  That requires figuring out exactly which forEach behavior we want, at the very least.  Or whether it should be tweakable in the IDL or something...

-- 
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/325#issuecomment-283543938

Received on Thursday, 2 March 2017 03:15:54 UTC