lexical for-in/for-of loose end

Brendan Eich brendan at mozilla.org
Tue Jan 31 11:11:31 PST 2012


Allen Wirfs-Brock wrote:
> Oh, I'm perfectly happy to see the initializer eliminated (for the new syntax).

See followup. If we can try to reserve 'let' in non-strict code, we can 
try to remove =i in for (var x=i in o). Why not make the attempt?

> But  side-effects eradication, in general,  seems like a wack-a-mole effort.
Clearly I've miscommunicated. I wasn't arguing against effects, only 
against the extra expression option in a zero-iteration for-in 
structure. There's no reason for it, it introduces non-trivial 
complexity into some implementations, and it's a source of minor 
mischief for code analysis.

/be


More information about the es-discuss mailing list