Re: GC pros and cons
Re: GC pros and cons
- Subject: Re: GC pros and cons
- From: Philip Aker <email@hidden>
- Date: Thu, 25 Jun 2009 09:06:58 -0700
On 2009-06-24, at 10:48:06, Andy Lee wrote:
On Wednesday, June 24, 2009, at 12:14PM, "Philip Aker" <email@hidden
> wrote:
Like Gwynne, I'm comfortable with the traditional "reap what you
sow" philosophy. This has benefits in that the basic policy spills
over into other areas of programming and gradually, one learns as a
matter of habit, to account for things all the time.
I can appreciate having an elevated sense of responsibility, but 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. I suppose
you trust malloc() and free()? But you're trusting those to do a
lot of stuff behind the scenes as well (like glomming together
contiguous blocks of free memory) -- and you're trusting yourself to
balance them properly.
That's a good point but I see that Hamish Allan has a rather effective
counter in trusting a 10 year old ISO/IEC standard.
As we adopt higher-level languages, we trust them to do things for
us so that we're freed to think at higher levels of abstraction.
Perhaps we should discuss your definitions of being free and "higher
levels of abstraction" and whether or not they have merit?
The current implementation of GC in Objective-C may not reach a high
enough level of trust for you, but to rule out GC as inherently
irresponsible is kind of silly IMHO.
I haven't ruled it out and if we could judge by Apple's behavior in
the past, I may not have any choice in the near future.
In a nutshell, for folks like me who regularly use CFCreate …
CFRelease in loops, what are the benefits of GC?
I think it's pretty obvious what the benefits are: not having to
manually manage memory, which eliminates one class of bugs and frees
up time and mental effort so you can concentrate on avoiding and
fixing other classes of bugs. I'm not sure if you were expecting
more than the obvious?
I think it's because I value consistency throughout more than
shortcuts available for technologies A and B, but not for technologies
C and D.
Anyway thanks, that was certainly a thought provoking reply,
Philip Aker
echo email@hidden@nl | tr a-z@. p-za-o.@
Democracy: Two wolves and a sheep voting on lunch.
_______________________________________________
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