D/Objective-C, extern (Objective-C)
Michel Fortin
michel.fortin at michelf.ca
Tue Jun 25 11:59:47 PDT 2013
On 2013-06-25 18:06:33 +0000, Walter Bright <newshound2 at digitalmars.com> said:
> On 6/24/2013 1:18 PM, Michel Fortin wrote:
>> And I don't think it is very common in D either. Either way, if D was to
>> implement ARC for its own memory allocator instead of the current GC (which
>> would be great) there's noting to prevent implementing it so that reference
>> counts could be incremented from the middle address of a memory block, it'd be
>> quite easy in fact, and quite necessary too because of the way arrays work.
>
> From my reading about ARC, it seems to me that we should support it now
> rather than later because:
>
> 1. people will expect it of D
>
> 2. non-ARC is inherently unsafe
>
> 3. migrating non-ARC code to ARC is error-prone and a major nuisance
>
> 4. non-O-C programs can also benefit from ARC (after all, reliance on
> the GC is the perennial dealbreaker for people wanting to migrate high
> performance code to D)
Exactly. Even without support for Objective-C, ARC in D is a very
desirable feature. Beside that, the C++/COM WinRT API also uses ARC
now, so I'd say it's becoming a must have pretty quickly.
--
Michel Fortin
michel.fortin at michelf.ca
http://michelf.ca/
More information about the Digitalmars-d-announce
mailing list