Allen Wirfs-Brock (2013-06-24T16:41:21.000Z)
github at esdiscuss.org (2013-07-12T02:27:38.079Z)
On Jun 24, 2013, at 9:07 AM, Erik Arvidsson wrote: > I'm with Jason here. > > The only argument I can vaguely remember is that people want to be > able to use these on old browsers without @@iterator? But I don't see > why a polyfill could not tag things with `__iterator__` or something > else? I think the other argument is that the Array iteration methods historically accept anything that vaguely looks "array-like". If you can say: ```js Array.prototype.forEach({0:1,1:1,2:2,length:3}, n=> console.log(n)); ``` why can't you say: ```js Array.from( {0:1,1:1,2:2,length:3}).forEach(n=>console.log(n)); ``` or: ```js for (let n of Array.from( {0:1,1:1,2:2,length:3})) console.log(n); ```