https://issues.dlang.org/show_bug.cgi?id=2043

--- Comment #18 from hst...@quickfur.ath.cx ---
If the loop index is mutable, then I think it's OK to make it shared across
loop iterations. Creating a new instance of a loop variable per iteration is
only necessary if (1) the loop index is immutable, and (2) it is being closed
over.

(I also think modifying the loop counter of a foreach loop is a very bad idea
-- you should be using a good ole for(...) loop or while loop instead -- but
that's beside the point.)

--

Reply via email to