Weird rule for immutable
Timon Gehr
timon.gehr at gmx.ch
Sun Apr 12 02:30:28 UTC 2020
On 11.04.20 03:26, Adam D. Ruppe wrote:
> On Saturday, 11 April 2020 at 01:19:29 UTC, Victor Porton wrote:
>> Why this is disallowed?
>
> Immutable means it NEVER changes. If you want it to just temporarily not
> change, that's what const is for.
No. `const` is for data that may or may not change at any time, just not
by accessing it through that `const` reference. He is absolutely right
that the rule is weird.
More information about the Digitalmars-d
mailing list