unique ownership + unlimited safe generational references

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Wed Mar 30 16:59:36 UTC 2022


On Wednesday, 30 March 2022 at 14:19:36 UTC, Nick Treleaven wrote:
> On Wednesday, 30 March 2022 at 12:39:40 UTC, Ola Fosheim 
> Grøstad wrote:
>>
>> You would need a lock on the object, so it is far worse than 
>> ARC?
>
> Wouldn't you need a lock on the object anyway if you're 
> accessing its fields? If not, why can't we access the 
> generation field of the object without a lock too?

No, not comparable. Preventing the object from being reused as a 
random type is different from controlling access sequencing.



More information about the Digitalmars-d mailing list