On Thursday, 7 November 2013 at 14:27:59 UTC, Daniel Davidson wrote:
Regarding what is idiomatic D, isn't `immutable x = rnd.next % levelSize;` pedantic.
Why not just go with `const x = rnd.next % levelSize;`

I actually prefer usage of `immutable` by default for value types because it is likely to cause a compilation error if later code changes to stop conforming value semantics. `const` version is likely to still compile with wrong assumption.

Reply via email to