DIP60: @nogc attribute
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Fri Apr 18 08:34:44 PDT 2014
On 4/17/14, 10:09 AM, Walter Bright wrote:
> On 4/17/2014 2:32 AM, Paulo Pinto wrote:
>> Similar approach was taken by Microsoft with their C++/CX and COM
>> integration.
>>
>> So any pure GC basher now uses Apple's example, with a high
>> probability of not
>> knowing the technical issues why it came to be like that.
>
> I also wish to reiterate that GC's use of COM with ref counting contains
> many, many escapes where the user "knows" that he can just use a pointer
> directly without dealing with the ref count. This is critical to making
> ref counting perform.
>
> But the escapes come with a huge risk for memory corruption, i.e. user
> mistakes.
>
> Also, in C++ COM, relatively few of the data structures a C++ program
> uses will be in COM. But ARC would mean using ref counting for EVERYTHING.
As a COM programmer a long time ago, I concur.
> Using ARC for *everything* means slow and bloat, unless Manu's
> assumption that a sufficiently smart compiler could eliminate nearly all
> of that bloat is possible.
>
> Which I am not nearly as confident of.
Well there's been work on that. I mentioned this recent paper in this
group: http://goo.gl/tavC1M, which claims RC backed by a cycle collector
can reach parity with tracing. Worth a close read.
Andrei
More information about the Digitalmars-d
mailing list