C versus Objective-C


#1

Question: Am I correct in assuming that the first few chapters of this book (and the simple command-line programs that we write) fall under the C programming language (as opposed to Objective-C)?

In my coursework at school I took several classes that were focused on C# and Microsoft’s IDE. As I’ve started getting more into Aaron’s book I noticed that the structure of Objective-C to be - essentially - the same as C# (which I expected, given that they’re both object oriented languages).

I have an interest in learning C since it’s extremely prolific in the development community, but I’ve always assumed that - since C is procedural - it would be markedly different from what I was taught initially (OOP). But after going through the beginning of this book, I began to wonder if I wasn’t doing C at the very beginning of the book. Am I correct in this understanding? How difficult would it be for me to pick up C, if I already know a couple of OOP languages?


#2

Yes, the first part of the book is C.

Objective-C is a superset of C: it includes all of C and some object-oriented extensions. And we Objective-C programmers use it all.

So you’ll need to learn some C if you want to be a good Objective-C programmers.

It won’t be difficult to pick up at all; C is a small and sensical language.


#3

Thanks for the response.

Any recommendation for a good book on C? I’ve found a number of websites that provide free tutorials, but they seem to cover the same topics that were introduced at the beginning of your book.


#4

The C covered in my book (some is at the beginning, some is at the end) is sufficient. You don’t need another book.

But if you want one, Expert C: The Deep C Secrets is great.


#5

While I agree with Aaron’s assessment (Expert C is indeed an awesome book) I must point out that it’s not a traditional book for learning C; it’s a book for exploring dark corners of the C programming language that most programmers don’t fully understand. (I think most understand the topics well enough to write software, but not well enough to explain how it really works under the hood.)


#6

hm - I guess as I become more familiar with C# and Objective-C (and eventually Java), I’d like to be able to put my knowledge of C on my resume as well. Even if I’m not using C as much as the other languages, I still want to understand it and be competent with it.