D/Objective-C, extern (Objective-C)

Steven Schveighoffer schveiguy at yahoo.com
Mon Jun 24 11:03:57 PDT 2013


On Mon, 24 Jun 2013 13:53:40 -0400, Walter Bright  
<newshound2 at digitalmars.com> wrote:

> On 6/24/2013 6:27 AM, Michel Fortin wrote:
>> Finally, there is a couple of features that were added to Objective-C  
>> since then
>> that should be added to the todo list to keep feature parity. Some of  
>> those, if
>> implemented right, could benefit the rest of D too. For instance: ARC  
>> (automatic
>> reference counting) which is becoming a must in Objective-C.
>
> Arc has very serious problems - I don't see how it can be done and be  
> memory safe without adding extensive pointer annotations. The general  
> problem is someone taking the address of a member of the reference  
> counted object. The rc goes to zero, the objects gets deleted, and  
> there's that dangling pointer to it.

All data members in Objective-C are private.  So the object can control  
when it gives out this data, and take appropriate actions.  AFAIK, ARC  
does not worry about internal pointers.

-Steve


More information about the Digitalmars-d-announce mailing list