DIP60: @nogc attribute

Paulo Pinto via Digitalmars-d digitalmars-d at puremagic.com
Thu Apr 17 01:22:29 PDT 2014


On Thursday, 17 April 2014 at 08:05:42 UTC, Ola Fosheim Grøstad 
wrote:
> On Thursday, 17 April 2014 at 06:56:11 UTC, Paulo Pinto wrote:
>> There is a reason why Dalvik is being replaced by ART.
>
> AoT compilation?

Not only. Dalvk was left to bit rotten and has hardly seen any 
updates since 2.3.

>
> Btw, AFAIK the GC is deprecated for Objective-C from OS-X 10.8. 
> Appstore requires apps to be GC free... Presumably for good 
> reasons.

Because Apple sucks at implementing GCs.

It was not possible to mix binary libraries compiled with GC 
enabled and with ones compiled with it disabled.

I already mentioned this multiple times here and can hunt the 
posts with respective links if you will.

The forums were full of crash descriptions.

Their ARC solution is based on Cocoa patterns and only applies to 
Cocoa and other Objective-C frameworks with the same lifetime 
semantics.

Basically the compiler inserts the appropriate [... retain] / 
[... release] calls in the places where an Objective-C programmer 
is expected to write them by hand. Additionally a second pass 
removes extra invocation pairs.

This way there is no interoperability issues between compiled 
libraries, as from the point of view from generated code there is 
no difference other that the optimized calls.

Of course it was sold at WWDC as "ARC is better than GC" and not 
as "ARC is better than the crappy GC implementation we have done".

--
Paulo


More information about the Digitalmars-d mailing list