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

Cabbit

macrumors 68020
Original poster
Jan 30, 2006
2,128
1
Scotland
Hi there i am about to get started learning to program for the iPad, my previous experience is in Ruby, PHP, Visual Basic, Basic and a little Java.

Just by a finger count i have 20 books on C and 30 on C++ so if you recommend one it's possible i have it.

Now what i am wanting to know is if i am programming for a iPad is it only Objective C or is it a mix of Objective C and C, i also notice Apple says C++ programs are supported so would a grounding in C and C++ helm me learn Objective C and get me started on my first iPad application?
 
Unless you are absolutely married to C++ I'd forget it. Even if you are using C++ you still have to write Objective-C to interface with the GUI components: there is no C++ interface. Also a lot of the system frameworks only provide Objective-C or pure C interfaces...
 
So if i want to get started with it should i start with C then learn Objective C once i have a grasp of C?
 
So if i want to get started with it should i start with C then learn Objective C once i have a grasp of C?

Yes. Make sure you understand what pointers are and the basics of flow control in C. Then you are in a good position to learn Objective-C. Remember in Objective-C you are using a perfect superset of C: any valid C is also valid Objective-C.
 
As an Amazon Associate, MacRumors earns a commission from qualifying purchases made through links in this post.
When programming in C vs. Objective-C you really focus on different parts of the C specification. Because of the way the Obj-C runtime handles memory you don't really have to deal with it in the same way at all in day-to-day Obj-C programming (assuming you are not touching CoreFoundation, or other straight-C stuff).

However, if you don't learn C you are going to run into some real problems from time to time, for example you occasionally need to know what pointers really are. These bits are going to be mystifying when you run into them unless you know C. You can go back and learn them, so you can probably do it in either order. Learning Obj-C first is probably going to feel like you are making quicker progress.
 
You can write apps in a mix of C and Objective C. The mix is up to you, except that it's a ton easier to do any iPhone UI using Objective C.

Newbies tend to try and write even low-level code in Obj C syntax. High performance game engine and audio developers tend to write in straight C with a very thin Obj C wrapper.
 
Thanks to all of the "voices of experience" here. I'm just getting going with Objective C. I appreciate the input about C vs. Obj C.

Thank you!
 
When programming in C vs. Objective-C you really focus on different parts of the C specification. Because of the way the Obj-C runtime handles memory you don't really have to deal with it in the same way at all in day-to-day Obj-C programming (assuming you are not touching CoreFoundation, or other straight-C stuff).

However, if you don't learn C you are going to run into some real problems from time to time, for example you occasionally need to know what pointers really are. These bits are going to be mystifying when you run into them unless you know C. You can go back and learn them, so you can probably do it in either order. Learning Obj-C first is probably going to feel like you are making quicker progress.

I agree. Probably concentrate on Objective-C and then later you can learn C. I had to brush up on my C (it's been more than 15 years) after and during my learning of Objective-C.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.