Optional monitors suggestion

bearophile via Digitalmars-d digitalmars-d at puremagic.com
Fri May 16 04:15:06 PDT 2014


Yuriy:

> http://dpaste.dzfl.pl/f44762a17fe4

As workaround for a D design bug I suggest to write code like 
this:
foreach (immutable c; 0 .. 100_000)

Instead of:
foreach(c; 0..100000)

Because unfortunately by default that c index is not immutable, 
and this causes significant troubles if you mutate it by mistake.

Bye,
bearophile


More information about the Digitalmars-d mailing list