const as default for variables

Walter Bright via Digitalmars-d digitalmars-d at
Sat Mar 14 22:08:16 PDT 2015

On 3/14/2015 8:50 PM, deadalnix wrote:
> Const is the inconvenience of immutability without its benefit. That would be a
> poor default, IMO.

It's utility is in self-documenting encapsulation.

It also turns out that it offers optimization possibilities for ARC systems.

More information about the Digitalmars-d mailing list