Why do immutable variables need reference counting?

rikki cattermole rikki at cattermole.co.nz
Sun Apr 10 23:19:47 UTC 2022


immutable isn't tied to lifetime semantics.

It only says that this memory will never be modified by anyone during 
its lifetime.

Anyway, the real problem is with const. Both mutable and immutable 
become it automatically.


More information about the Digitalmars-d-learn mailing list