Wouldn't `const` be enough? AFAICS, `immutable` is mostly useful for shared data.
const prevents modification, but does not guarantee that no modification takes place elsewhere. I.e. it enables fewer program transformations.
Timon Gehr via Digitalmars-d Sat, 13 Sep 2014 12:25:37 -0700
Wouldn't `const` be enough? AFAICS, `immutable` is mostly useful for shared data.
const prevents modification, but does not guarantee that no modification takes place elsewhere. I.e. it enables fewer program transformations.