Null iterable in for-of?
brendan at mozilla.org
Thu Jun 12 15:25:55 PDT 2014
Jeff Walden wrote:
> On 06/12/2014 03:05 PM, Allen Wirfs-Brock wrote:
>> > I believe this behavior for for-in was added in ES5. My recollection was that Doug Crockford pushed for it. I don't recall if it was because it matched web reality or simply because he thought it was a good idea.
> It was added for web compatibility, to track what was originally a SpiderMonkey implementation bug, I believe.
Actually, if memory serves, IE JScript tolerated null and undefined on
right of for-in. SpiderMonkey and my ur-JS implementation, Mocha, did
not. Someone with the jwz nostalgia Netscape 2/3 browsers, please test.
I don't think bug-hiding precedent trumps bug-finding, personally. Allen?
More information about the es-discuss