ketmar:
Jonathan explains it very well. i can add the only thing: don't use `const` until you forced to. ;-)
In D use immutable (or const) everywhere you can. Possibly mark as immutable everything doesn't need to mutate.
sure, you can cast `const` away in your code, but using `cast` is a good sign of taking the wrong way.
Casting away a const is quite dangerous in D because if you later mutate the data, you will probably have bugs.
Bye, bearophile