--- Comment #3 from 2011-09-12 15:10:08 PDT ---
(In reply to comment #2)
> Making a const/immutable copy is not the right solution to this.

Keep in mind that foreach(i;0..10) must have *zero* abstraction penalty over a
for loop even with non-optimizing D compilers, because it's meant to replace
for loops everywhere possible. The more abstraction you put into foreach there
higher the probability it will not have zero abstraction penalty (currently it
has a bit of penalty for nested loops, sometimes).

> not possible using const:
> foreach(i; 1 .. 10)
>   while(i--) { do some }

Use a for loop :-)

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to