RE: how is C often used in Cocoa, if at all?
RE: how is C often used in Cocoa, if at all?
- Subject: RE: how is C often used in Cocoa, if at all?
- From: "Josh Ferguson" <email@hidden>
- Date: Tue, 11 Feb 2003 15:40:00 -0600
- Priority: normal
- Thread-topic: how is C often used in Cocoa, if at all?
Ben,
That's kind of a difficult question to answer. If you're asking if it is valuable to learn C before learning Objective-C and Cocoa, I'd say it's nearly indespensible if you wish to program well. C forces you to have a basic understanding of operating system fundamentals (like the stack, memory heap, how memory is allocated for objects, etc.), which lends itself to any programming environment and leads to a better understanding overall.
Objective-C is certainly "easier" to use on OS X because you have a solid, moderately documented foundation in Cocoa. With that said, there are quite a few things that are possible in Carbon that are not possible in Cocoa, and since Carbon is a C API, it's certainly beneficial to be able to read, interpret, and apply C Code. On top of that, you open up a whole slew of options in Unix libraries. Not knowing and understanding C severely limits you in these regards.
On top of all this, you have to keep in mind that Objective-C is a superset of C...in fact, everything in Objective-C is parsed into C before being into machine code. If you tried reading the book, "The Objective-C Programming Language" without a fundamental understanding of C, I think you'd find yourself frequently scratching your head and looking perplexed. C is an indispensible part of Objective-C, and while it's possible to jump into Objective-C without getting a good understanding of C, I wouldn't recommend it.
There are certainly sitautions that lend themselves better to C than Objective-C (i.e. if speed is important). If you're planning on doing anything in OpenGL for example, you cannot do it without knowing C. Anyways, that's just my 2 cents. Since I started programming in Objective-C my knowledge and understanding of C has improved immensely; I wish I would have taken more time to get a better understanding of C before getting into Objective-C.
Josh Ferguson
MindVision Software
http://filestorm.mindvision.com
-----Original Message-----
From: Ben Dougall [
mailto:email@hidden]
Sent: Tuesday, February 11, 2003 2:13 PM
To: Cocoa Development List
Subject: how is C often used in Cocoa, if at all?
Hiyer,
I'm currently learning C before I get stuck into Objective-C and Cocoa,
and am just skimming this list in preperation - to see what's going on.
And I'm wondering if C is used much in writing Cocoa applications? It
doesn't seem to be, from what I've read on here, or have I got the
wrong impression there?
How often, and how is C often used from within Objective-C and Cocoa,
if at all? Are there some things that lend themselves well to being
written in straight C, and other things that don't? Which sort of
things? Is it just a matter of preference and ends up being easier not
using C?
I know these are very broad questions but I'm just trying to get an
understanding of how C fits in generally with Obj-C and Cocoa.
thanks, Ben.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.