Dmitry Olshansky:

Regarding what is idiomatic D, isn't `immutable x = rnd.next %
levelSize;` pedantic.
Why not just go with `const x = rnd.next % levelSize;`

IMHO yes, it's pedantic.

It's a little pedantic, and it's some characters longer than "const", but I think it's the good standard to use unless something (D implementation bugs, bugs or missing parts in Phobos, code logic, etc) prevents you to use it :-)

Bye,
bearophile

Reply via email to