Conway's game of life

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Feb 3 06:35:20 PST 2015


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


More information about the Digitalmars-d-learn mailing list