Want reasonable reference counting? Disable automatic sharing of immutable

Steven Schveighoffer schveiguy at gmail.com
Fri Nov 12 22:06:34 UTC 2021


On 11/12/21 2:38 PM, Kagamin wrote:
> The very idea is strange. If RCSlice is mutable, how can it be 
> immutable? Something doesn't add up.

Look up logical const, that is what this is. The mutable part never is 
immutable or const. We just also don't want it to be shared by default.

See also, C++ mutable keyword.

-Steve


More information about the Digitalmars-d mailing list