Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Buschmaster

macrumors 65816
Original poster
Feb 12, 2006
1,306
27
Minnesota
From what I've read cocoa takes advantage of C++, Objective-C, and Java, correct? So I'm looking at total beginning guides. Which should I learn? Would it hurt to learn C++ instead of starting with C and then going to C++? Also, I know a few languages alerady, so I will probably be able to get by with a bunch of online guides. I'm a college student so buying books would kind of suck...

So if I have C++ and Java to learn, as I'm assuming from what I've read in books, what would you like to have learned first, or would it have not made a difference?
 

Heath

macrumors regular
Aug 19, 2005
133
0
Canada
Well, it depends what your end goal is.
If you want to write native Mac applications, Objective C + Cocoa is the only way to go.
If you want to learn C++ or Java there are two excellent (and completely free) books available at http://mindview.net/Books which address each language.
As for recommendations on which order to go, or 'what to learn first', ask 10 different people and you'll get 10 different answers. Most of which however will mention 'C' at some point, so you may want to look into that.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
There is a Java bridge to allow you to use Java to write Cocoa apps. This is basically discontinued and not recommended. There is no straight forward way to use C++ with Cocoa. If you want to use C++ then you are heading into Carbon territory.

If you really want to use Cocoa Objective-C is the only realistic language to learn.
 

Soulstorm

macrumors 68000
Feb 1, 2005
1,887
1
My advice would be to learn plain C++ first. That would teach you basic and advanced OOP concepts. Then, Objective-C will be a two-days learning process for you. After that, you will be able to write mac-native Cocoa applications in no time. Objective C++ is a good way to go with Cocoa, too, after you have learnt C++. Learning C++ is crucial, imo because it will open you many doors into other platforms and programming enironments as well.
 

davidjohnson

macrumors newbie
Oct 22, 2006
2
0
Hi friends,
c++ is a object oriented programming language,or it's c with classes,
and java is also object-oriented programming language,it follows the syntax from c and oops concets from c++,
my suggestion is u first learn c then c++ and java.
 

Soulstorm

macrumors 68000
Feb 1, 2005
1,887
1
c++ is a object oriented programming language,or it's c with classes,
C++ is far more than C with classes. It also has operator overloading, templates, and much more than just classes. C with classes is just the original name (and intention) of Stroustrup when building the initial version of C++. But many things have changed since then.
 
B

BigMäc

Guest
If you want to use C++ and/or do cross platform development, Qt is a very nice option.
Maybe it's a good idea not to learn C first. (link)
 

Cvstos

macrumors member
Nov 19, 2004
88
0
Personally, here's what I recommend.

First, start with C++. It'll be tricky at first. Get a good book (or three) and go through it(them) completely. Once you're good at C++, you can start with Java or Objective-C. I've heard that Obj-C is easy to learn with C++ mastery, but I haven't gotten around to toying with it yet. That being said, 95% of Java truly is downright easy with C++ mastery or even just a good chunk of C++ experience. The only stumbling block is I/O, but once you're past that it's smooth sailing, really.
 

HiRez

macrumors 603
Jan 6, 2004
6,265
2,629
Western US
Guys, don't we have, like, this exact conversation about...oh, once per week? :rolleyes: I feel like Bill Murray in Groundhog Day.
 

caveman_uk

Guest
Feb 17, 2003
2,390
1
Hitchin, Herts, UK
Surely suggesting someone learn C++ in order to learn objective-C is bit of overkill? It's a bit like saying someone needs to become an electrical engineer just to change a plug.
 

bousozoku

Moderator emeritus
Jun 25, 2002
16,120
2,397
Lard
I'd think that learning Java first would be more useful since it's closer in philosophy to Objective-C than C++ is. Reading about Smalltalk helps a lot, too.

Anyone who knows how to programme can pick up object-oriented languages but if you become too entranced by those extra C++ features, it makes it difficult to transition to another object-oriented language.

davidjohnson and Soulstorm:

I believe that C++ was called C + classes originally. Then again, there weren't compilers for it, just a pre-processor called Cfront.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.