Re: GC pros and cons
Re: GC pros and cons
- Subject: Re: GC pros and cons
- From: Philip Aker <email@hidden>
- Date: Tue, 30 Jun 2009 02:03:03 -0700
On 2009-06-25, at 11:11:56, Andy Lee wrote:
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.
He said he *would* trust a compiler that conforms to that standard.
Just to be clear, Hamish wrote:
> Compilers conforming to C99 I would trust.
> gcc -fobjc-gc... not so much.
Meaning to me that C99 is a direct descendent of C89 and K&R before
that. So that means roughly 30 years of evolvement and nit-picking
high and low by a lot of people on nearly all platforms extant.
Objective-C 2.0 doesn't seem to have a published standard (like with a
language syntax summary as in Appendix A of C99). 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.
He went on to agree that it's silly to treat GC as inherently
irresponsible.
Yes. But that doesn't prove that it's a responsible philosophy, only a
technology that Apple has use for at the moment (and obviously,
doesn't have too many bugs).
He was pointing out that nothing's perfect. (Sorry, Hamish, if I'm
putting words in your mouth.)
I see Hamish has answered that directly himself.
From your standpoint, it's only an effective counter if you call my
bluff and tell me you really do only program in assembly, because
trusting a compiler to be C99-compliant enough to push arguments on
the stack is like firing a shotgun into a crowd.
No. I think you're trying to place too much weight on the niggling
concreteness of your assembly analogy. I agree it's a good point,
however I don't believe it's the sole criteria for evaluation. That's
because following that type of argument would likewise engage one in
the act of validating the assembly language itself, chip
architectures, materials used, etc., etc., ad infinitum. For that
portion of my post, I think I was actually trying to be at a higher
level of abstraction.
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?
Perhaps we should discuss your definiton of "merit" first. :) I
don't think I used the terms vaguely or ambiguously. I think I used
them in a way most programmers would understand in this context.
For me, it's not a foregone conclusion that I've entertained a higher
level of abstraction when I don't have to free what I've allocated.
Balance has merit where a fundamental term of abstraction is: "As
above, so below".
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