Smart pointers instead of GC?

Paulo Pinto pjmlp at progtools.org
Tue Feb 4 10:14:38 PST 2014


Am 04.02.2014 01:24, schrieb NoUseForAName:
> On Monday, 3 February 2014 at 23:00:23 UTC, woh wrote:
>>  ur right I never thought of that, I bet all them game devs never
>> thought of it either, they so dumb.  I bet they never tried to use a
>> GC, what fools!  Endless graphs of traced objects, oh yes oh yes!  It
>> only runs when I allocate, oh what a fool I've been, please castigate
>> me harder!
>
> Also people should consider that Apple (unlike C++ game devs) did not
> have a tradition of contempt for GC. In fact they tried GC *before* they
> switched to ARC. The pro-GC camp always likes to pretend that the
> anti-GC one is just ignorant, rejecting GC based on prejudice not
> experience but Apple rejected GC based on experience.
>
> GCed Objective-C did not allow them to deliver the user experience they
> wanted (on mobile), because of the related latency issues. So they
> switched to automated ref counting. It is not in question that ref
> counting sacrifices throughput (compared to an advanced GC) but for
> interactive, user facing applications latency is much more important.

The reality of those hanging around Apple developer forums before ARC 
existed, was more related to crashes caused by Apple's implementation 
and their interaction with third party libraries. Specially the amount 
of special use cases one needed to take care of.

They *failed* to produce a stable GC implementation for Objective-C, 
that is the reason, not better performance.

--
Paulo


More information about the Digitalmars-d mailing list