|
In a blog post here, someone indicates that the notion of moving to Objective-C 2.0 only after Leopard comes out reveals a lot about too little ambition and talent. To me, posts like this reveal an elitist, snobbish attitude that only serves to embarass those with such an attitude. This same attitude was strewn about by C++ programmers when VB3 programmers began writing Windows code - the C++ programmers had been "doing it the hard way" for years, and they had far more low-level control, and they could produce applications with far more performance... They also had three or four times the time-to-market, double the bug rates, and a lot of other side effects that resulted from monolithic code and manual pointer and memory management.
What bugs me is why people would complain about having people pick up Objective-C 2.0 but for the "wrong reasons". If you can code, and you can code well, and you produce good products - why does it matter whether you decided to go to Objective-C 2.0 for the "right" reason (its an extremely powerful language that has been around since the dawn of time) or the "wrong" reason (some people thing garbage collection is the wrong reason).
The bottom line here is that Objective-C is an awesome language, and I love its dynamic features, the loose messaging abilities, the syntax is nice - its basically an object-oriented C that went toward Smalltalk to get its objects instead of C++. I have no qualms using malloc and dealloc, etc. However, that said, I do enjoy what .NET offers me - a chance to think about the overall application I am writing, the hiearchy, the structure, the architecture, the design - without worrying about whether or not I forgot to release something, without worrying about reference counts, and without manually unravelling an object graph upon deallocation. I think that garbage collection is a productivity enhancement, not some crutch that allows poor programmers to set foot upon the elitist ground that was previously held solely by the "hard core" programmers who march to the beat of a different managed environment.
So. I guess what I'm saying is this: if you are an inexperienced programmer who cannot properly manage your own memory, then moving to a GC'd environment like Objective-C 2.0 (or the .NET Framework for that matter) will not make you able to write good applications. However, if you are a developer with decent development habits, good discipline, and the knowledge of when things should be allocated and when they should not, then moving to a GC'd environment should make you more productive.
Whining and complaining that people are planning on adopting Objective-C 2.0 for the wrong reasons is immature and elitist. We all suffered through the scorn of C++ developers when we wrote VB/COM, and we suffered through the scorn of ADA programmers when we wrote Delphi, we suffered through the scorn of Java programmers when we wrote C#. There will always be egos when there are programmers, and I foresee a lot of developer puffer-fishes expanding their chests when they sneer down at a new breed of developers who cut their teeth on Garbage Collected Objective-C who start all their developer stories with, "Back in my day...".
Good apps are good apps, bad ones are bad ones, good developers or bad developers - it is all the same whether you're in a GC environment or not.
That last sentence is so true. Sometimes people need to take a step back
and think about the overall product and the experience it provides. Who
cares about the implementation if the product is a dream to use?
Does OC only run on a MAC? - when do you find the time!!! I have so much
code to write and its all web based so c#/asp.net is just too fast to use
something else but it would be nice :)
Craig,
Well, i think the post you mention is intended to be - at least in part -
provocative; you just have to read a bit between the lines ;-). And i don't
even think the majority of Mac developers out there would fully share this
view of easy malloc-dealloc (cf. Autoreleased objects hanging around like
Hitchcock's Birds,
http://www.cocoabuilder.com/archive/message/cocoa/2004/8/18/114873).
Pretty provocative, IMHO. Just look at these two docs as well to get a feel
how tricky Cocoa memory management can get:
I just hate those superficial VB-C#-ObjectiveC whatever clickers that build
crappy software really fast.
Quality software can be only done by understanding the details, everything
else is pure crap.
"I have no qualms using malloc and dealloc, etc."
free is C++, dealloc is Objective-C, from what little I know of the
language.
Kevin --
Quite right. With having gone from C to C++ to VB to COM to MFC then to
Java and then to .NET and now jumping into Objective-C, it is really easy
to get the syntax for allocation and releasing confused.
"Just look at these two docs as well to get a feel how tricky Cocoa memory
management can get: "
All too true. And what's even funnier is how old a concept GC really is;
you have the (elitist) assembler/C/C++-crowd getting the masochist-price
and the Lisp/APL/Smalltalk-crowd just nodding their heads: "they all learn
eventually..."