[pool drain] - objective huh?

I have written code in most of the languages that have come and gone.  Assembler, Forth, Basic, C, C++, Ada, Pascal, Lisp, Scheme, C#, Java, PHP, Ruby, Scala, Groovy, JavaScript, and, now, Objective C.

For the third or fourth time I set up XCode on one of my macs and, having a little time on my hand, wanted to write something for my Mac.  Yes, that’s my idea of fun. For the third of fourth time, I was shocked that the “Hello World” program looked something like this:

// First program example int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSLog (@"Hello World"); [pool drain]; return 0; }

Mmm…kay, I said to myself checking the calendar and making sure it was still 2010.

What is this?  ”int” argc, const char* argv[] — oh yeah, C.  Ritchie and Kernighan.  NS* oh yeah, NextStep.  That’s when Steve built beautiful black cubical boxes that were way ahead of THEIR time.  alloc, init —  I understand that understanding memory management is good for a programmer to know, just like it is important to understand how a car’s transmission works.  But, though I know how to drive a stick, I prefer automatic or at least Tiptronic in my car.  @”Hello World” OK, except for the @.  [pool drain], that’s memory again.  And wow, neato, it’s message passing and you can actually chain methods.  Very novel.

I am sorry.  I just don’t get it.  And I don’t get Apple’s fundamentalist stance that code needs to be written in this language when there are so many others out there that, I dare say, are simply MUCH better.  You name it, the latest Java, C# 4, Ruby, Groovy, Scala, Python.  Hey, there’s also Erlang, and F# for functional types.  And there’s always JavaScript and even PHP 5.  Flex 4 is elegance manifested compared to this.  Damn it, proprietary Mathematica scripts are more pleasant.

I love Apple and Apple’s products.  I have many macs and mac notebooks. I once owned a Newton! I have bought every version of the iPhone and plan on buying an iPad.  I love running linux code on my Mac.  I love the company’s sense of elegance in design and the user experience it gives me.  I love the fact that my computers rarely go down or need a reboot.  I own a lot of Apple stock and want the company to kick even more ass.

Why do I have to learn this language to do anything cool?  I know Apple has market clout.  But developers are not easily bullied and will find an alternative.  Remember Cobol, remember Windows SDK, remember the enterprise guys struggling with SAP ABAP?  And let’s add Knuth to the MIX (pun intended).

Come on now, there has to be a better way. I being a technical hostage.