Learning Cocoa

I’m about halfway though Aaron Hillegass’s Cocoa Programming for Mac OS X Second Edition (ISBN 0-321-21314-9). All I can say is “wow”. I thought Objective-C was going to be a pain because it lacks a garbage collector, but even without a GC Cocoa way more efficient than Java/Swing. I know, it’s an apples and oranges comparing an application framework with a widget toolkit. But Objective-C is simply a better fit of GUI programing. Property change support is built into every object without requiring a lot of boilerplate code. The widgets invoke actions with a target and selector instead subclassing interfaces (you can use trampolines in Java get the same sort of savings). Yeah, Objective-C has got it’s problems (flat class namespace) but it is nowhere near a painful as I thought. I wish I’d bought this book a year ago.