PDA

View Full Version : Objective - C, Do i need to learn C




Hitachi-Chan
May 9, 2011, 03:50 PM
Huge newbie question here. Do i need to learn C to learn Objective - C, im already guessing its a yes but i just want to make sure. Thanks.



lee1210
May 9, 2011, 03:59 PM
You don't have to learn C first, but learning Objective-C will be learning C plus some. This gets debated fairly frequently here, with no real consensus. If you have use for C outside of Objective-C, learn it separately so you know what's what. If not, and your only goal is Mac/iOS development, probably dive into Objective-C. Steve Kochan's Programming Objective-C 2.0 will cover what you need of C, so that might be a good place to start "from scratch".

-Lee

balamw
May 9, 2011, 06:29 PM
Steve Kochan's Programming Objective-C 2.0 will cover what you need of C, so that might be a good place to start "from scratch".

Just note that the material does not resonate with some folks, so if you don't "get it" consider another book. "Learn Objective C on the Mac" http://www.apress.com/9781430218159 is an alternative that may work better for you if Kochan fails for one reason or another.

Also the next edition of Kochan is due next month, and is updated for Xcode 4.

You should decide now if you are going to stick with Xcode 3 until you are comfortable with it or go straight to Xcode 4.

B

larswik
May 10, 2011, 12:15 AM
Balamw said almost what I was going to say and I did not like the Stephen Kochan's book. For me it was dry, boring and wordy. I took a step back to learn C using this book which I liked http://www.apress.com/9781430218098 and this forum was a big help.

I even then took a class in Pascal which was another step back but a good thing. Learning from a book and then a teacher is a very different thing. The interaction was important for me.

Today was the last class and next Monday the Final!

-Lars

firewood
May 10, 2011, 02:22 AM
Objective C is a superset of plain ANSI C. If you don't learn a fair amount of C, you haven't really learned Objective C, only a tiny part of it, and you won't understand how Objective C really works.

gnasher729
May 10, 2011, 02:42 AM
Huge newbie question here. Do i need to learn C to learn Objective - C, im already guessing its a yes but i just want to make sure. Thanks.

You don't need it to the point where you would be a competent C programmer, but you need some idea what it does. Some of the syntax of Objective C is very obscure to someone learning Objective C - until you realise that it's really C and then it becomes obvious.

You'll need to know about the basic types, pointers (very important), and you'll need C if you do any real maths.

monsieurpaul
May 11, 2011, 01:23 PM
It will also depend on your computer background. Do you know any other language: Java, PHP, Python ?
If not, you should try with a quick intro with C with online tutorials or books. As gnasher729 said, it's really important to understand what a pointer is.
For my part, I started with "Learn C on the Mac" (Mark) then switched to "Programming in Objective-C 2.0" (Kochan) and "Cocoa programming for Mac OS X" (Hillegass). The latter is a must.