immutable postblit unusable?
Steven Schveighoffer
schveiguy at yahoo.com
Tue Feb 13 13:58:51 UTC 2018
On 2/11/18 3:25 AM, Jonathan M Davis wrote:
> In the case of immutable, the postblit is actually completely unnecessary,
> because there's no need to do a deep copy of an immutable object, since it's
> guaranteed to never change its value (whereas with const, a deep copy can
> still be necessary, since other references to that data may be mutable and
> could thus change the data).
What about reference counting? Essentially, you could be changing values
external to the type itself.
I don't think postblit should be illegal on immutable types.
-Steve
More information about the Digitalmars-d
mailing list