Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Study Objective-C , Ruby OR Python? [closed]

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

like image 364
anand Avatar asked Feb 15 '09 07:02

anand


2 Answers

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.

like image 189
Himadri Choudhury Avatar answered Oct 08 '22 19:10

Himadri Choudhury


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

like image 33
Erik Engheim Avatar answered Oct 08 '22 18:10

Erik Engheim