objective-crubymacosmacrubyhotcocoa

Could MacRuby / HotCocoa supplant the need to know Objective-C?


I just discovered MacRuby / HotCocoa and really like the sound of what they're doing.

I had essentially discounted the prospect of making Cocoa GUI applications myself because I have an aversion to spending time & effort learning yet another C-based language, Objective-C. I'm not saying it's bad, just not for me.

Is it the case now, or in the probable future, that one will be able to make Cocoa GUI applications of substantial and first-class nature with MacRuby / HotCocoa alone while ignoring Objective-C completely?

(Edit: Desktop Mac, not iPhone)


Solution

  • It will be extremely difficult to build first-class apps through a translation layer. It's hard enough to get the performance and behavior you need natively. I'm impressed with MacRuby's approach, and particularly impressed that they are able to manage things like Core Animation (a key piece of first-class Mac apps) and Core Data (which is tough stuff). I'm really impressed with their use of more idiomatic Ruby rather than the ugliness of RubyCocoa. But there are reasons that Apple has "deemphasized" (as they've called it) their multi-language dalliances in Java, Ruby, Python, etc. It's hard enough to write this stuff in one language. It's hard enough to get it right when you're not going through a semi-supported translation layer. In practice, you still have to learn the ObjC syntax to deal with the documentation and all the existing code. In practice, you still have to learn the ObjC patterns to develop decent Mac apps.

    MacRuby is interesting. Even as a seasoned ObjC programmer, I might consider HotCocoa for hacking up prototypes and trying out interfaces. But it's not the kind of thing I'd use to build, as you say, "Cocoa GUI applications of substantial and first-class nature."

    As developers, part of our job is to have a bag of tools. Like a good carpenter has several different hammers, plus pry bars, nail sets, several kinds of square and a dozen other tools, a programmer should be comfortable with a variety of languages, programming paradigms, platforms and environments. She then should be able to choose the correct tools for the job and employ them effectively. In the case of Mac programming, the correct tools for the job include Xcode, IB, ObjC and Cocoa. Avoiding them is like a carpenter avoiding a framing hammer and speed square. They're just part of the job.