DIP74: Reference Counted Class Objects
Nick Treleaven via Digitalmars-d
digitalmars-d at puremagic.com
Fri Feb 27 09:24:02 PST 2015
On 26/02/2015 22:04, Andrei Alexandrescu wrote:
> On 2/26/15 2:03 PM, Brian Schott wrote:
>> 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?
>
> It's a liberty still left to user code. -- Andrei
ISTM nothrow would be a sensible starting point. That would simplify
compiler implementation and avoid invisible inefficiency in user code.
Shouldn't we wait for a compelling use case for throwing in these
functions before supporting it?
More information about the Digitalmars-d
mailing list