Paul:

Regarding the immutable loop variable, I've conditioned myself never to interfere with loop control values

But adding "immutable" you don't risk modifying the variable by mistake.

It's another design mistake of D. Variables (like foreach loop indexes) must be immutable by default because otherwise programmers often don't bother making them immutable. It's a lost war.

Bye,
bearophile

Reply via email to