Initializer expression on for-in syntax subject
Geoffrey Garen
ggaren at apple.com
Fri Mar 14 14:17:11 PDT 2014
> JSC has been trying to kill off the initialiser expression in the for(in) statement, but we've encountered a bunch of reasonably significant content that breaks with it disallowed (a particularly prominent one currently is http://battlelog.battlefield.com/bf4/), so we will be bringing back support for
>
> for (var Identifier = Expression in Expression)
I suggested to Oliver that we accept "Identifier = Expression in Expression” as valid syntax, but drop "= Expression” from the parse tree after the fact. That way, we can still almost completely remove the construct from the language without harming web compatibility.
I don’t see much value in making this decision based on strict mode. So far, we’ve got nothing but trouble from policies like that.
Geoff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140314/35550e7b/attachment.html>
More information about the es-discuss
mailing list