News for hackers. Stuff that matters.
Re:Google Closure: How not to write Javascript by jeff18 on Thursday November 12, 2009 @02:06AM (#937315)
It would have to determine that arr.length doesn't change during the loop. Pretty difficult problem. :)
Re:Google Closure: How not to write Javascript by gojomo on Thursday November 12, 2009 @12:46PM (#938272)
I'm unsure if the smiley means you're being sarcastic, but if not:

Such determinations are a pretty common thing for an optimizing compiler to attempt:

http://en.wikipedia.org/wiki/Loop-invariant_code_motion