DIP74: Reference Counted Class Objects
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Fri Feb 27 10:38:02 PST 2015
On 2/27/15 10:34 AM, David Gileadi wrote:
> On 2/27/15 6:36 AM, "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm at gmx.net>"
> wrote:
>> On Friday, 27 February 2015 at 08:26:14 UTC, Ola Fosheim Grøstad wrote:
>>> On Thursday, 26 February 2015 at 22:04:09 UTC, Andrei Alexandrescu
>>> wrote:
>>>> On 2/26/15 2:03 PM, Brian Schott wrote:
>>>>>
>>>>> 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
>>>>
>>>> All - please PLEASE do not derail this into yet another debate about
>>>> which names are best. -- Andrei
>>>
>>> Using protocols rather than enforcing a particular implementation is
>>> nice, but D needs to stop reinventing terminology and syntax matters.
>>>
>>> -- snip --
>>
>> AddRef/Release is established COM terminology.
>
> One reason for keeping COM terminology might be if
> std.c.windows.com.IUnknown can automatically take advantage of DIP74. Of
> course this could also be a downside—would DIP74 break existing COM code
> in D?
I explicitly avoided the COM names in order to avoid potential confusion
and code breakage. People can easily add IUnknownAuto that does the
forwarding. -- Andrei
More information about the Digitalmars-d
mailing list