• 0

C or C++ before moving onto Objective-C?


Question

I am toying with the idea of doing some iOS development in the not too distant future however I have zero experience with Objective-C and getting any on anything other than OS X is pretty painful/impossible.

It has been a long time since I did any real coding in C and while I can stumble my way through old cold (both of mine and others) I wouldn't say I can remember enough to embark on writing a new project in C from the start. C++ I have used more recently (although still 3½ years ago).

With my plan to move onto ObjC in the longer term I am wondering if learning C or C++ in the meantime (I don't have the , i.e. a mac to learn ObjC) would be a sensible use of time.

From what I have read ObjC shares more in common with C than it does C++ so I am thinking that getting familiar and writing a few little apps in C might be a better idea than polishing up my C++ knowledge.

Are there any ObjC developers who would mind giving me their opinions?

For a little more background I mainly work in C# and Java these days. C++ every now and then to fix something in some old Windows 2000-era apps we have floating around the place running silently in the dark (waiting to scare somebody heh).

Many thanks all,

M

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Objective-C is a true superset of C (meaning that any C code is valid in Objective-C), but learning C won't teach you anything about object oriented programming which you could learn in C++. But you can always learn about it while you learn Objective-C.

Personally I prefer C so maybe that's why I like Objective-C, there's something about C++ that I don't like as much but I don't know what (mind you C++ is also a superset of C, just not a true one)

Link to comment
Share on other sites

  • 0

I have had a look on ebay but can't seem to find any cheap intel based mini's :( (I am in the uk). I would love to pick up an intel based mac mini for ?100 or so even if I am stuck with an older version of OS X. I am tempted to go the hackintosh route on my laptop if I can't find one.

As for which language to revise I think I am going to dig out some books on C and write a few little apps to get back into the swing of things. The OOP side of things I already know well as I work daily in C# and Java so that shouldn't be a problem with ObjC and as it seems to be a cleaner superset of C compared to C++ I think getting my C skills back on form is the best option. Cheers for your advice!

Link to comment
Share on other sites

  • 0

why not just learn objective-c. I learned C# with no prior programming at all and now I can make windows phone apps/games and program in xna.

Link to comment
Share on other sites

  • 0

I learned C before Objective-C and although every single book recommends you do just that, I found that everything I learned in C went out the window with Objective-C. It's not that it suddenly became 'wrong' but just that there were much better and easier of doing things in Obj-C.

I think if you understand programming languages and the concept of OOP, you'll be fine going straight to Obj-C.

Link to comment
Share on other sites

  • 0

Whilst I personally prefer C++ to any other language (and despise plain C), I'd say your best bet would be C if you really want to start with Objective-C as most of the C++-goodies (like RAII) won't be available in ObjC?

Link to comment
Share on other sites

  • 0

Well Obj-C is drastically different from C which is procedural language while Obj-C is completely OOP. So you have to understand OOP first. Even though Obj-C syntax in some cases will feel familiar to C (as it should be since it was based on C), Obj-C is completely different way of doing things, it has a lot of C legacy stuff but most of the stuff you will be using is really pure Obj-C.

My suggestion to you is to start by watching a lecture on Lynda.com from Simon Allardice called Objective-C Essential Training. It will guide you through OOP principles and how they apply/are done in Obj-C and will show you what are similarities with C and what is completely different.

I loved his course when I watched it. He's a great teacher and presenter and after you watch it you will be ready to dive into iOS development and start learning the SDK and Cocoa framework which is really the biggest part of Mac/iOS development. Knowing these APIs.

Link to comment
Share on other sites

This topic is now closed to further replies.