[MacRuby-devel] Tyro Needs Ruby vs. O-C Advice
Jordan K. Hubbard
jkh at apple.com
Wed Mar 30 22:27:20 PDT 2011
On Mar 30, 2011, at 8:43 PM, Bryan Harrison wrote:
> So… I understand that Cocoa is a given, but today's million dollar question is Objective-C or MacRuby? I'm a blank slate with regard to both and so could use some good advice. For example…
>
> What are the advantages of MacRuby over Objective-C?
>
> What are the advantage of O-C over Ruby?
Well, do bear in mind that you also asked this question in the MacRuby list. Were you genuinely hoping for un-biased answers? ;-)
That said, I'll do my best to represent the other side of the argument even though I'm actually an old C hacker (generally avoiding higher-level languages by choice) and have no real personal preference either way. The advantages of ObjC over Ruby are:
1. Objective-C is definitely the main game in town on Mac OS X / iOS. When it comes to interoperability with 3rd party libraries, sample code / tutorials for either platform or documentation, you're generally going to find that ObjC is always first in line as far as priorities are concerned.
2. Objective-C (and/or C at "the POSIX layer") will give you the greatest flexibility in programming for the platform. Whereas Ruby always drags its runtime around with it, the lower-level languages don't have as much baggage and can be used in a wider variety of situations, such as programming for the kernel (C only of course) or creating plug-ins for other systems like Audio Units, Core Graphics Filters, Authorization plug-ins and so on.
3. Most new API comes to C/ObjC first, often being later "wrapped" in MacRuby in some way, but now you have to rely on either the MR folks to get around to it or the new API being introspectable/bridgesupport-able enough to be called without a wrapper.
The advantages of Ruby / MacRuby have already been listed by others, though I'm not sure job security is necessarily one of them. I see a lot of job postings for C and ObjC programmers, the various app stores having created something of a "gold rush" for them, just as the web development boom gave Ruby programming a boost through Rails.
- Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110330/1d71e184/attachment.html>
More information about the MacRuby-devel
mailing list