News for hackers. Stuff that matters.
Re:Google Closure: How not to write JavaScript by bajsejohannes on Monday December 13, 2010 @09:35AM (#2000546)
> My feeling is that even the compilers written in CS101 will optimize this.

Then it might be harder than you think. You can't know that array.length won't change during the course of the loop. Even in your simple example, I would say it takes a fair bit of analysis (not for a human, of course), to be certain that "array[i]++" won't add elements to the list.

There are no comments on this comment yet.