Study Objective-C , Ruby OR Python?

15,641

Solution 1

I use all the languages C++, Ruby, Python and Objective-C. I like each one in different ways. If you want to get into Mac and iPhone development as others I recommend Objective-C.

One of the benefits not mentioned is that Objective-C is a proper superset of C (C++ is almost a superset), that means you can bring over all your C programming knowledge from doing C++ to Objective-C programming. In fact you can also mix in C++ code in Objective-C code.

You can't do that in a seamless way in Python and Ruby. The reason why you can do this is that Objective-C is actually a very simple language.

Originally it was just C with a custom made preprocessor which took statements like this:

[rectangle setX: 10 y: 10 width: 20 height: 20];

and converted it to this before compiling:

  objc_msgSend(rectangle, "setX:y:width:height:", 10, 10, 20, 20);

Apart from that Ruby, Python and Objective-C are very similar in their object model at least compared to C++. In C++ classes are created at compile time. In Objective-C, Ruby and Python classes are things created at runtime.

I wrote some stuff on why Obj-C is cool here

Solution 2

If you want to program for iphone then you should use objective-C. The entire iphone API is based on objective-C, and you have the benefits of using interface builder and IDE support from Xcode.

Solution 3

Which language you guys see the FUTURE???

Future of what? iPhone development? Objective-C.

Web Services? Python/Ruby in parallel for a while. At least until people start trying to do maintenance on large Ruby applications and get frustrated with it's opacity.

Real-time game engine development? Embedded applications? Future of what?

"Can we program with these languages on other platforms? Or are these only limited on MAC?"

Ruby and Python: Yes. These are designed to run on any platform that supports C.

Objective-C: Yes. It's open source, it's in the GCC, it should work almost anywhere.

Learning a new language is not a zero-sum game. You can learn more than one language; learning Objective-C now does not prevent you from learning Python or Ruby in the future.

Solution 4

Objective-C is the only way to program an iPhone if you want to produce native programs that can be sold in the App Store.

Some of the more advanced concepts in Objective-C are now being added to languages like C# (eg: extension methods in C# v3.0). Learning to think in Objective-C will be useful, the OO model you learn will be applicable to most other languages and environments as an addition to your C++ experience.

Ruby's object model is closer to that of Objective-C than is Python so I suggest also learning Ruby but not until you have your Objective-C skills down solidly.

Note that you can use Objective-C++ and use C++ for all but your GUI code by having .mm suffixes on your files - this works on both iPhone and Mac. Given your C++ experience, that help you be productive.

If you want to program iPhone, don't bother learning the new Objective-C 2.0 memory management but you can still use the Properties model (iPhone effectively has a subset of the Objective-C 2.0 runtime).

Solution 5

As a Perlite, I'm just going to point out that OS X has Perl as well as Python or Ruby.

As far as Perl/Python/Ruby goes, programs are almost completely cross-platform. It is fairly easy to run a Perl/Python/Ruby program on any platform and it works more or less the same. There may be some minor differences, but they're not major.

Objective-C, while not strictly confined to OS X, is only really used in OpenStep-based environments, which generally means OS X and the iPhone. The only Objective-C compiler I know of is gcc, and I imagine you can write Objective-C on Linux, but I don't know if Windows support is very good (if it exists).

As for which is the language of the "future", all 3 (or 4) languages will be used very widely in the future. No one can really predict this kind of thing, and none of the languages are really going to die off (unless Apple switches to a new language as a "standard" for making Mac programs), so you'll be pretty safe with any of them.

My advice: try them all out and see which one you think most suits your style, and learn that one.

Share:
15,641
user3341101
Author by

user3341101

Updated on June 04, 2022

Comments

  • user3341101
    user3341101 almost 2 years

    I am working on C++ since last 4-5 years . Recently I have bought iphone and macbook and want do do some programming for iphone.

    So I have started reading one book about Objective-C. I have also learn that we can program with Ruby and Python on MAC.

    So my question is which one to study? Which language you guys see the FUTURE???

    Can we program with these languages on other platforms? Or are these only limited on MAC?

    I am just a beginner in objective-C.Need some expert thoughts which way to go.

    AC

  • user3341101
    user3341101 about 15 years
    SO is it possible to develop desktop application with perl/ruby/python like we can do in C++?Or are there only web languages?
  • visual_learner
    visual_learner about 15 years
    It's possible to develop desktop applications with Perl/Python/Ruby just like any language. At least, Perl and Python I know. I'm not sure on Ruby, but it's probable. Nothing is "only" a web language (well, maybe PHP).
  • John T
    John T about 15 years
    @Chris gtk.php.net =P
  • TOMKA
    TOMKA about 15 years
    I frequently use Objective-C for Windows development. Remember, it is a strict superset of C, so you can use Windows API calls in it with no issues at all.
  • visual_learner
    visual_learner about 15 years
    @John T: Jesus, they have everything. Next thing I know there'll be a GUI interface for LOLCODE.
  • Admin
    Admin about 15 years
    it seems you jumped on the bandwagon as well
  • Gucho Ca
    Gucho Ca almost 8 years
    PHP works very well for Web Services, so you cannot say only Python or Ruby for a Web Service.
  • user1066101
    user1066101 almost 8 years
    The question specifically listed Python, Objective-C, and Ruby. The question did not mention PHP.