Re: GC pros and cons
Re: GC pros and cons
- Subject: Re: GC pros and cons
- From: Andy Lee <email@hidden>
- Date: Tue, 30 Jun 2009 19:43:30 -0400
On Tuesday, June 30, 2009, at 06:11PM, "Hamish Allan" <email@hidden> wrote:
>On Tue, Jun 30, 2009 at 10:03 AM, Philip Aker<email@hidden> wrote:
>>[...] Apple has a track record of introducing stuff that is
>> subsequently dumped. And gosh, I might not like to be the one who trusted in
>> GC to be around forever and then found out I had to account for all those
>> [[NSThing alloc] initWithImpunity:…] calls in Mac OS X 10.7.
>
>Just to be clear, my concern is not that Apple might dump GC in a
>future release. what I wrote was in reply to Andy's seeming reductio:
>
>"if you take this to the extreme you'd insist on programming in
>assembly because you don't trust compilers to properly put things on
>the stack on entering a function and remove them on exiting"
>
>because this trust in automatic storage duration is *precisely* what
>is lacking with the current implementation of GC in Objective-C.
Which makes the example I chose sort of ironic, but I don't *think* you were disagreeing with my main point, which was that we allow languages / compilers / runtimes to do bookkeeping for us all the time without moral qualms about letting someone else match our debits to our credits.
Anyway, as I wrote to Philip off-list: trust might not have been the right issue to bring up, because one could trust the implementation of GC to work correctly and trust Apple to support GC forever and still believe it's an irresponsible programming practice, just as you could believe your C compiler compiles goto perfectly and still believe it's an abomination. I happen *not* to think that, but no need to climb on that merry-go-round again.
--Andy
>
>What really concerns me is that several Apple engineers participating
>in the thread I linked to are in complete denial about the way in
>which gcc -fobjc-gc breaks C99 (the closest I got to an admission was
>Greg Parker saying "The underlying problem is that the garbage
>collector is not in fact a conforming program, so following C99's
>rules may not do what GC wants.")
>
>Like I said, I understand *why* it breaks C99, and I think the
>breakage is worthwhile, but it really ought to be properly documented.
>Changing NSData to return collectable memory won't fix the problem.
>
>Hamish
>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden