Safe reference counting cannot be implemented as a library

Manu via Digitalmars-d digitalmars-d at puremagic.com
Tue Oct 27 04:57:11 PDT 2015


On 27 October 2015 at 21:41, Andrei Alexandrescu via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
>
> It follows that if we want safe reference counting, there must be language
> support for it. One possibility is to attach an attribute to the class
> definition:
>
> @safe @rc class Widget {
>   ...
> }

An attribute? Is presence of opInc()/opDec() insufficient? Would the
attribute signal fabrication of some default opInc/opDec operators
applicable for general use?


More information about the Digitalmars-d mailing list