★ TouchArcade needs your help. Click here to support us on Patreon.

How much C do you need for objC?

12-21-2009, 10:35 AM
#1
Joined: Sep 2009
Posts: 7,318
How much C do you need for objC?

I've started learning how to code for the past few days and the Apple website said I needed some experience from C to learn objC. SO I started with C. But the question is how much C do I need to know for objC?
12-21-2009, 01:18 PM
#2
Joined: Sep 2009
Posts: 7,318
Anyone?

12-21-2009, 01:19 PM
#3
well, my question is, what are you using to learn C? im interested...

The Life Blog
Minecraft
12-21-2009, 01:34 PM
#4
Joined: Sep 2009
Posts: 7,318
Quote:
Originally Posted by The prez 12521 View Post
well, my question is, what are you using to learn C? im interested...
I'm using some of my parents books on C from when they went to a class for it. Its pretty good actually, explains UNIX too.
edit: Cannot be found online though.
12-21-2009, 02:33 PM
#5
Joined: Nov 2008
Location: Munich, Germany
Posts: 754
Send a message via Skype™ to mobile1up
Quote:
Originally Posted by da shiz wiz 19 View Post
I'm using some of my parents books on C from when they went to a class for it. Its pretty good actually, explains UNIX too.
edit: Cannot be found online though.
i used to teach C at university level. it is definitely NOT the language for people just starting out; there are a lot of pitfalls you can fall into. but there are a lot of common syntax rules between C, Objective-C, Java, C++ and C#. there are some online tutorials, such as:

http://www.cprogramming.com/

but, C programming is not for the light hearted; while it is my language of choice; it is because i've been doing it for 15+ years now - and i know the pitfalls inside out to know how to avoid them.

// Aaron Ardiri
Mobile 1UP is a proud indie developer - support us!
developer of Caveman / Caveman HD and GW Series
12-21-2009, 02:45 PM
#6
Joined: Sep 2009
Posts: 7,318
Thanks mobile1up
But I'm not going to be going 'in-depth' with it. I want to learn enough to begin objc.
What is a language you suggest starting on?
12-21-2009, 03:14 PM
#7
Joined: Aug 2009
Posts: 116
Quote:
Originally Posted by da shiz wiz 19 View Post
Thanks mobile1up
But I'm not going to be going 'in-depth' with it. I want to learn enough to begin objc.
What is a language you suggest starting on?
Obj-C is a superset of C. You'll need to understand C well to program in Obj-C since it's 99% C to begin with.
12-21-2009, 03:41 PM
#8
Joined: May 2009
Location: Palmerston North, New Zealand
Posts: 464
I'm sure there are books that would teach Obj-C to people who have no background in programming. Those books are bound to teach the necessary C stuff in tandem with the Obj-C stuff.

The Obj-C book we have in the office (it is sadly underused but when I have looked through it it's been brilliant) is called "Programming in Objective-C" by Stephen G. Kochan. Here is an excerpt from the introduction that might be of interest to you:

Quote:
"...When contemplating writing a tutorial on Objective-C, a fundamental decision had to be made. As with all prior texts on Objective-C, I could write mine to assume the reader already knew how to write C programs. I could also teach the language from the persepctive of using the rich library of routines, such as the Foundation and Application Kit frameworks. Some texts also take the approach of teaching how to use the development tools, like the Mac's Project Builder and Interface Builder.

I had several problems adopting this approach. First, learning the entire C language before learning Objective-C is wrong. C is a procedural language containing many features that are not necessary for programming in Objective-C, especially at the novice level. In fact, resorting to some of these features goes against the grain of adhering to a good object-oriented programming methodology. It's also not a good idea to teach all the details of a procedural language before learning and object-oriented one. This starts the programmer off in the wrong direction, and gives the wrong orientation and mindset for fostering a good object-oriented programming style. Just because Objective-C is and extension to the C language doesn't mean you have to learn C first!

So, I decided neither to teach C first nor to assume prior knowledge of the language. Instead I decided to take the unconventional approach of teaching Objective-C and the underlying C language as a single integrated language, and from an object-oriented programming perspective..."
Before you run out and buy this book though a caveat: I haven't learnt Objective-C from this book and I already knew C and C++ before learning Objective-C. I am merely using the book as a reference (and a good one!) every now and then so I can't say whether it does an effective job of teaching the language from scratch. But it does seem to suit your purposes

Check out Sheepish, 100+ levels of puzzle fun! With sheep!
And more about us: www.pixelthismobile.com
plus+ id: Newtz
12-21-2009, 05:48 PM
#9
Joined: Sep 2008
Posts: 48
I'v read about that book, "Programming in Objective-C", it got great reviews but there are some concerns. It's quite old and written for an earlier version of the SDK. A follow-up book has been released but if I remember correctly the new one left out on some of the basic beginner parts. But check it out, I'm not entirely sure.
12-21-2009, 05:53 PM
#10
Joined: May 2009
Location: Palmerston North, New Zealand
Posts: 464
Quote:
Originally Posted by dolly View Post
I'v read about that book, "Programming in Objective-C", it got great reviews but there are some concerns. It's quite old and written for an earlier version of the SDK. A follow-up book has been released but if I remember correctly the new one left out on some of the basic beginner parts. But check it out, I'm not entirely sure.
Yes the edition we have is 2004 but it's not written for the SDK at all, it concentrates on teaching you the language and leaves you to figure out specific frameworks yourself. In this way it remains relevent despite being 5 years old. I don't know anything about newer editions though.

Check out Sheepish, 100+ levels of puzzle fun! With sheep!
And more about us: www.pixelthismobile.com
plus+ id: Newtz