1. Welcome to the new MacRumors forums. See our announcement and read our FAQ

Jump from C to Objective-C

Discussion in 'Mac Programming' started by R.Youden, Jan 13, 2007.

  1. macrumors 68020

    R.Youden

    #1
    I am learning C programming for working with DSP and embedded programming for an Electronics Degree but I would like to try my hand at programming for application building. I understand that most programming uses Objective-C. How much does this differ from C? I have a book on X-Code programming and when I have finished with C I will look at jumping across.
     
  2. Moderator

    robbieduncan

    Staff Member

    #2
    Objective-C is a super-set of C. You can do everything you can do in C. And you have a full object system to work with as well. If you are programming Mac apps then you'll have access to Cocoa, a massive object-oriented library for programming apps.

    If you have no idea about object-oriented programming (and if you are only used to straight C you won't) I'd recommend reading up on the general concepts first.
     
  3. macrumors 68020

    R.Youden

    #3
    Do you have any books that are good for objective programming that is mac based?
     
  4. Moderator

    robbieduncan

    Staff Member

    #4
    I have one, pretty poor, book released sometime around 10.0 - 10.1 timeframe. I'd not recommend it!

    Everyone seems to like the Hillegass Book
     
  5. Moderator emeritus

    #5
    It's too bad that Bruce Eckel doesn't do Objective-C because I really like the Thinking in... series of object-oriented programming books for Java and C++.

    The Hillegass book is good, though, but it won't give you the broader perspective that would be more useful.
     
  6. macrumors 68030

    Catfish_Man

    #6
    The big jump going to objc is moving to thinking in objects. That'll take some time and practice.
     
  7. macrumors member

    #7
    What part of it is giving you difficulty? Best way to learn the syntax is to start hacking at it.

    As to the "philosophy" of it: just get some work thinking in an object-oriented paradigm. You can use Objective C as the "base language" to learn it (for me it was C++ and later Python). Studying UML may also help.
     
  8. macrumors 68000

    Soulstorm

    #8
  9. macrumors 68000

    iEdd

    #9
    For someone with zero assumed experience, would these 2 books get me from newbie to decent with Obj C and Cocoa in Xcode? I've programmed in java, but the book was based around windows IDEs and Java updates confused things.
    Obviously the mac book is based on a mac, but is the book by Steven Kochan based around Xcode or other software for mac?
    I'd really like to get into writing small Cocoa apps but I don't want a book that assumes prior C knowledge or assumes I have windows.
    Thanks.
     
  10. macrumors 6502

    #10
    And practice and yet more practice. Coming from a procedural background it really took a long time for me to wrap my head around OOP.

    OP whenever you make an objc program, make an effort to see whether you really have created viable objects, or procedural programs in disguise.
     
  11. macrumors 68000

    iEdd

    #11
    Just a note to anyone wanting to buy this book, it's 88% :)eek:) off at Barnes and Noble, bringing it to $5. I've ordered both the books in this thread :)
     
  12. macrumors 68040

    mduser63

    #12
    That's for the older edition. Probably worth paying full price for the new edition, as it covers things about Cocoa that didn't exist when the first one was written (Bindings is a big one).
     
  13. macrumors 6502

    #13
    Steve Kochan's book is written with XCode in mind (well, ProjectBuilder actually, an older version of XCode). He doesn't assume prior C knowledge.

    Read that and then Hillegass' book, and you'll be well on the way.

    By the way, Objective-C is relatively unknown and unused outside the Mac world, so you're unlikely to find any Objective-C material that is Windows-based.
     
  14. macrumors 68000

    iEdd

    #14
    Thanks Nutter
    Damn. Ah well.. I might have to think about the newer edition later on then. Is the old edition obselete now, or will what's in it still work?
    EDIT: That's why I got confused, the link posted above is for the old edition :(
     
  15. macrumors 65816

    XnavxeMiyyep

    #15
    http://www.cocoalab.com/BecomeAnXcoder.pdf

    That pdf is a great start if you already know how to program in C (like I did). It would probably be pretty good for those without any programming experience at all too.
     

Share This Page