Thread: Should I learn C, or Objective-C first?

  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    65

    Should I learn C, or Objective-C first?

    Hey everyone,

    For a person like me that is doing this on my own time by reading books, and using the only computer I have which is a Windows 7 desktop PC, and has zero experience in any language out there no matter what it is except for English since that's all I know, lol. Should I learn C from a book called Prata C Primer Plus? Or should I learn Objective-C first?

    Thank you,

  2. #2
    Registered User
    Join Date
    Oct 2012
    Posts
    99
    I am right now working through Prata's C Primer Plus and I really like it. Just starting chapter 6. I don't know anything about Objective C however, but I give two thumbs up on Prata's book. In fact, I like it so much I went ahead and bought his C++ book too.

  3. #3
    Registered User
    Join Date
    Apr 2006
    Posts
    65
    Thank you for that info!

  4. #4
    Registered User
    Join Date
    Sep 2012
    Posts
    357
    Disclaimer: I don't know Objective-C, have never written a single line in that language.

    I believe Objective-C is a strict superset of C.

    So if your ultimate goal is to learn Objective-C there is no harm studying a C book.
    However, there may be Objective-C idioms not covered in a C book, which you will only find about later on.
    My suggestion is to start with a basic Objective-C book (to get a feeling for the language idioms) and then go for more detailed books (which can then be plain old C).

  5. #5
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Asking this questionb in a C forum is more likely to result in advice to learn C. Asking in an Objective-C forum is more likely to result in advice to learn Objective-C.

    The real answer is to learn the one you intend to use. If you don't know which one you intend to use, decide what types of applications you intend to write, and then do your homework and work out which language is better suited to those applications.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  6. #6
    Registered User
    Join Date
    Nov 2012
    Location
    Texas
    Posts
    3

    Maybe this will help....

    As someone with a fair bit of both C and Objective-C experience, I can offer my observations and opinions... Objective-C is a higher-level language that is better suited to full application programming. C is a better match for embedded processors, system programming, and probably games (at least for smaller game projects).

    I've sometimes called C the Latin of computer languages, since so many modern languages evolved from it. For anyone who's looking at a career in programming, in which they may eventually have to deal with any number of different languages, a foundation with C is a great place to begin. And of course, it is still heavily used in its own right.

    If you are going to develop on Apple platforms (Mac OS X and iOS), you need to learn Objective-C. A lot of the increased popularity of ObjC in recent years is due simply to the rise of the iGadgets. ObjC should also be a good choice for application programming on Linux, although I don't speak from experience in that regard. Linux is built on a foundation of C, and ObjC is a true superset of C, so I wouldn't expect it to have any difficulties interfacing with Linux's many many existing libraries and APIs. (As far as I know, ObjC is not a popular choice for Linux development, but that's largely for historical reasons: because C++ caught on with the Linux community years ago, rather than because of any particular shortcomings of ObjC.)

    If you want to create apps for Windows, I'd suggest learning whatever Microsoft promotes and supports these days -- probably C#, I guess?

    C is potentially more efficient when working on systems with limited resources, or where maximum performance is needed, or when coding API libraries that may need to be accessed from various other languages. Due to its lack of OOP features and its very non-automated memory management scheme, C does make you work harder to organize large and complex programs. As it happens, I am getting ready to undertake some modest game projects on the Raspberry Pi, and C is the natural choice. ObjC would offer no advantage for that sort of thing.

    IF you have decided you need to learn Objective-C, there's certainly no harm in learning the basics of C first. Even though the programming style and "flavor" of ObjC is very different, and the way you organize programs tends to be very different, all the details of how C works are transferrable to ObjC and may even come in handy to know sometimes.

  7. #7
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    5,108
    because C++ caught on with the Linux community years ago
    ^_^

    Somewhere a man named Linus is quietly heaving and does not know why...

    Soma

  8. #8
    Registered User
    Join Date
    Nov 2012
    Location
    Texas
    Posts
    3
    More likely crying... See here: Linus Torvalds on C++

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Objective C
    By knightjp in forum A Brief History of Cprogramming.com
    Replies: 11
    Last Post: 04-01-2009, 01:18 PM
  2. Objective C
    By anirban in forum Tech Board
    Replies: 2
    Last Post: 04-28-2007, 09:50 PM
  3. Objective-C?
    By cboard_member in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 08-25-2005, 01:51 AM
  4. Objective C
    By Shadow12345 in forum C++ Programming
    Replies: 19
    Last Post: 01-15-2003, 01:40 PM
  5. gcc and objective c
    By Captain in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-13-2002, 03:03 PM