Null iterable in for-of?
allen at wirfs-brock.com
Fri Jun 13 09:50:05 PDT 2014
On Jun 12, 2014, at 5:01 PM, Jeff Walden wrote:
> On 06/12/2014 03:25 PM, Brendan Eich wrote:
>> 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.
> Hmm. I'm reciting tribal knowledge that I'm probably misremembering at this point, so I bet you're right.
It isn't listed as a JScript deviation in http://wiki.ecmascript.org/lib/exe/fetch.php?id=resources%3Aresources&cache=cache&media=resources:jscriptdeviationsfromes3.pdf
But http://wiki.ecmascript.org/doku.php?id=proposals:bug_fixes says that IE introduced it.
Also see http://esdiscuss.org/topic/for-in-statement-null-and-undefined if you have any interest in tracing the history of this change.
>> I don't think bug-hiding precedent trumps bug-finding, personally. Allen?
It sounds like the the tide is swinging towards bug finding rather than consistency in this case. I'm fine with and and will update the spec. accordingly.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss