DIP74: Reference Counted Class Objects

Brian Schott via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 26 14:03:17 PST 2015


On Thursday, 26 February 2015 at 21:50:56 UTC, Andrei 
Alexandrescu wrote:
> http://wiki.dlang.org/DIP74 got to reviewable form. Please 
> destroy and discuss.
>
> Thanks,
>
> Andrei

One of the first things that stood out to me is that "add ref" is 
two words and "release" is one. For the sake of symmetry, how 
about these:
*  opIncRef, opDecRef
*  opAcquire, opRelease

The DIP states that "Any attributes are allowed on these 
methods.", but later states "The complexity of this code 
underlies the importance of making opAddRef and especially 
opRelease nothrow". Should the DIP require that these two 
functions be marked nothrow?


More information about the Digitalmars-d mailing list