views:

2598

answers:

12

hi Guys,

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

+2  A: 

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.

Chris Lutz
SO is it possible to develop desktop application with perl/ruby/python like we can do in C++?Or are there only web languages?
Alien01
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).
Chris Lutz
@Chris http://gtk.php.net/ =P
John T
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.
dreamlax
@John T: Jesus, they have everything. Next thing I know there'll be a GUI interface for LOLCODE.
Chris Lutz
+6  A: 

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.

DasBoot
+1  A: 

If you program with Objective-C, your main goal should be writing Cocoa applications on the Mac. Beyond that, it has little use. Ruby and Python are useful scripting languages, and there are also bridges to write Cocoa applications.

If you want to write apps on the Mac, I would start with Objective-C. There is more support available.

In terms of the future, it seems like a lot of people are jumping on the Ruby bandwagon at the moment. Good luck.

alamodey
it seems you jumped on the bandwagon as well
+5  A: 

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).

Andy Dent
+1  A: 

To program on Mac OS X, you really do need a good foundation in Objective-C. The vast majority of documentation will assume Objective-C. Even if you choose to program some applications in some other language, you will be better off having a good understanding of it.

BobbyShaftoe
+2  A: 

As has been noted by others, if you want to program the iPhone, Objective-C is the way to go.

Objective-C is pretty Mac-specific; of course, the Gnu Objective-C compiler is avaialble for other platforms as well, and there is also GnuStep, but I think the main applicability of Objective-C today is for programming Macs and iPhones.

Python and Ruby on the other hand are available on a large number of platforms (including both Windows and many Unix-dialects). Personally, I prefer Python, but I would say both languages are very usable and pretty easy to approach.

Note also that both Python and Ruby have Objective-C bridges available, which allows you to write quite fancy Cococa applications in any of those languages.

Johan
+3  A: 

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.

S.Lott
A: 

Objective-C is only Mac/iPhone, and I recommend you to learn if you want to develop applications for Mac/iPhone. Python is everything and it's future, but python more preferable for web development. Python is Google :) Python is web, games, science, graphics, desktop, etc. Also it's very good choice if you are C/C++ developer.

Not sure if i can recommend you to learn Ruby...

Vladimir Prudnikov
+2  A: 

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

Adam Smith
+2  A: 

Ruby. With Ruby you will be able to do both web development (Rails/Sinatra/etc.) and very soon program on the MAC/Iphone platform with the Macruby project. Why not get the best of both worlds?

Tommy

Not that learning Ruby isn't a good thing in and of itself, but there is no evidence that MacRuby will ever be supported on the iPhone. The platform is strictly locked down, and Apple dictates what developers can do to an unusual degree. Not only in terms of the development technologies and APIs you may use, but even the functionality your app may implement. So while Apple *might* someday allow MacRuby apps that used ahead-of-time compilation (all interpreted languages are currently banned), jailbreaking aside, there's no reason to assume that will happen. (Actually, it seems unlikely.)
Mason
+1  A: 

Just my two cents...As I'm sure you're aware, Apple and others in the respective communities are doing a lot of work with Ruby and Python, for both Mac and iPhone development. Objective-C will pretty much get you into Apple arenas only these days (though maybe that's not a bad thing;) However, if you are only going to learn one language in the foreseeable future, think about where you will be using it, and what for. Ruby and Python will get you a lot further if you are looking beyond solely Mac desktop and iPhone.

Mark
A: 

I have written small games, interpreters, and tons of awessome stuff in Ruby. I Wouldn't recommend It to write intensive AI programs for instance, but It's fun to learn and powerful for most applications. Even when I do most of my work in C++ Ruby is my favorite language for subjective reasons.

Objective C as most people said Is a must in iPhone development, and fun if You're enthusiastic about learning languages.

I haven't tried Python, but I hear nothing but good things about It, and PyGames Is quite popular.

I would learn the three ( well...I would skip objective C unless You're curious about getting into iPhone development), the most languages you know, the best professional You will be. As a good professor of mine always said..It's not about being the master in just one language, It's about knowing the pros and cons of each one to choose the right one according to the particular problem You want to solve.

Cheers !

José Joel.