Mailbag: Cocoa bindings

TUAW reader Mark asks:

I want to start writing some programs for the Mac. But at this point in my life, I'd prefer to use some sort of higher-level language (perl, ruby, python, etc.) that has nice bindings to Cocoa / Obj-C. Does such a beast exist? What do people suggest? It's not that I couldn't do Obj-C, but I'm getting too old to manage my own memory, much less my application's.

This is a big question, and there aren't any simple answers. Or, rather, there are too many.The first is that "Cocoa" != "Objective C", or a least the Cocoa tools eliminate many of the traditional C-family programming headaches. The included Xcode SDK provides tools that abstract away most of the drudgery of managing the stack and the heap through calls to core.*
routines and NS* functions, as well as simplifying interface construction. Of course, this doesn't always lead to the world's most efficient programs, and depending on the complexity of your data and algorithms and the purpose of the project, you may find yourself falling back into more traditional system calls.

As for higher-level languages, almost everything has some sort of Cocoa bindings. For Python, there is the PyObjC project, and for Ruby, Ruby Cocoa. The only one I can speak for personally, though, is Sherm Pendly's exemplary Camel Bones Perl framework, which not only makes building Cocoa interfaces for Perl programs simple, but is also one of the best-documented projects I've ever come across, making it easy for Perl hackers and newbies alike to get started programming perl for OS X. Of course, since Apple makes X-11 available, there is a wide range of options. Perl and Python (and probably ruby) have mature Tk bindings, and Fink and DarwinPorts offer access to common Qt and GTK bindings.

People also swear by Java, but I've never seen the attraction, personally. My vote, as you can probably tell from the picture, goes to Camel Bones.

I
think that covers the big ones, but what are the rest of you using to develop your OS X apps and ports, especially those of you who prefer not to work with native Cocoa?

Recommended