Most relavent language to learn?

Discussion in 'Mac Programming' started by Kingsly, Aug 20, 2006.

  1. Kingsly macrumors 68040


    I have been wanting to get into some minor developing for a while, but there are more languages out there than I care to count.

    So, for a first-timer wanting to make some useful but not overly flashy or complicated apps, what programing language should I take the time to learn?

    Java, Carbon, Cocoa, C, AppleScript... the list goes on and I don't even have a clue at to what I'm talking about. :eek:
  2. FredClausen macrumors regular


    Aug 7, 2006
    You've mixed up two different groups of terms.

    First group is a programming language. Objective C, C, C++, Java are examples of a programming language.

    An Application Framework (among other terms, you can call these different things) is what is used BY a programming language to accomplish its task. Thats generalized, but good enough for now. Cocoa and Carbon are Mac examples of this, Qt and GTK are linux examples, and MFC is a windows example.

    If you look at the thread anchored at the top of this forum it describes two great books to help you learn Objective C* and Cocoa. There are also several GREAT websites in the thread.

    * I am assuming you want to program only on the Mac, which is why I am assuming Objective C is what you should learn.
  3. HiRez macrumors 603


    Jan 6, 2004
    Western US
    It's not an easy answer. Since you didn't mention you specifically wanted to do Macintosh programming, I would probably start with Java. I will tell you why I recommend Java to start:

    1. It runs on just about any box out there, and the code is portable across platforms.

    2. It has a good balance of built-in safeness (applet sandbox, no pointers or pointer arithmetic, automatic garbage collection) and power to be able to do some serious things with it as you grow in proficiency.

    3. It has a built-in, cross-platform GUI package (JFC/Swing, JSF) for building interfaces. Some great languages such as Python still do not have this, you have to add them on with extra bundles and learn the API (which is often written is some other language).

    4. There is a huge amount of free information available on the web about Java, including many, many tutorials, help boards, etc. When you're stuck on a problem at 3am this can be a big advantage. There are also hundreds of good Java books available.

    5. There are a number of good development environments available, scaling all the way from a simple text editor plus a command-line terminal, to full-blown integrated enviroments with all the goodies such as NetBeans, Eclipse, etc. Most of these are free/open-source.

    6. Java is based on C and at some point you'll probably want to learn C and C-derived languages such as C++ or Objective-C. Once you know Java, learning C is pretty easy (that's the path I originally took).
  4. Kingsly thread starter macrumors 68040


    Thanks for clearing that up. Like I said:
    Thanks. Since it sounds like I will eventually want to end up at the Objective-C level then perhaps Java is the way to go. I was afraid if I learned one language that I would have to start all over again to move up to something else...
  5. kainjow Moderator emeritus


    Jun 15, 2000
    As long as you understand the concepts behind programming, learning a new language is easy. It's just the APIs (like Cocoa, Carbon, .NET, MFC, etc) that take the longest to master.
  6. mduser63 macrumors 68040


    Nov 9, 2004
    Salt Lake City, UT
    If you really do want to learn Objective-C, then I recommend starting with Objective-C. Objective-C is not higher-level or harder than Java, it's just different. For Mac programming, Objective-C is definitely the preferred language. Besides that (IMO) it's a pretty good language for beginners, and you'll basically learn C in the process as well. I don't know Java, but I don't believe it's terribly hard to learn once you've mastered any normal object-oriented language. The concepts are mostly the same, there are just implementation details and specifics of the syntax that you have to learn.

    Now, all that said, if you aren't looking to learn to develop specifically Mac applications, then Java may be the better way to go. Java applications are generally fully cross-platform, but they're definitely not first-class native feel apps on the Mac, as anyone who has used Azureus or any number of other Java apps can attest.
  7. dukebound85 macrumors P6


    Jul 17, 2005
    5045 feet above sea level
    Haha I was going to say spanish or chinese but yea not the language I first thought of lol.

    I am trying to learn unix and c currently
  8. x704 macrumors regular


    Apr 15, 2006
    That's the way I feel after BASIC and a couple others before java. Like this guy said in a nutshell Java is easier to learn then c/c++, it is OO (Object Oriented) from birth, it is more strictly typed (less coding/compiling problems) and because it was made with c programmers in mind you can pick up on c/c++ quite easy later if you want.

    Also don't think you are limited to applets only. I personally don't like applets so I make my GUIs (Graphical User Interface) applications. As far as books go the one I use all the time is titled Beginning Java 2 by Ivor Horton, I have the one that covers JDK (Java Developers Kit) 1.2, you might 1.3 or 1.4 (1.4's ISBN is 0764543652). This book also covers Java applications as well was applets which I have noticed is somewhat rare.
  9. caveman_uk Guest


    Feb 17, 2003
    Hitchin, Herts, UK
    You didn't say why you wanted to learn a language. If it's to program only on the mac then objective-C/Cocoa is the most supported way of doing it (also the tools are free). If you want to program on other platforms as well then I'd say Java then perhaps C++ as both are pretty applicable to any platform. Also in the job market there's a fair bit of demand for both of those (as well as the usual MS only languages)
  10. Kingsly thread starter macrumors 68040


    Sorry, I suppose it would've been nice to mention that I want to develop for Mac.

    I am getting a general feeling that Objective-C is the way to go then...

    ...any good, entertaining (i.e. not stupidly dry) books that do a good job teaching it?
  11. Nutter macrumors 6502

    Mar 31, 2005
    London, England
    I would say so. Apart from the fact that Objective-C is the dominant language in Mac programming, it is also an excellent language to start with because of its simple and elegant syntax.

    I'd recommend Steve Cochran's book, "Programming in Objective-C". This book only covers command line applications, which is the very best way to learn a language if you're new to programming.

    After that, you can read one of the many Cocoa books to get you started with the blinkenlights. :)
  12. mduser63 macrumors 68040


    Nov 9, 2004
    Salt Lake City, UT
    The authors name is actually Stephen Kochan. Anyway, I second the recommendation. Excellent book.
  13. Kingsly thread starter macrumors 68040


    Thanks, I'm checking its availability at my local Borders right now.

    Now... what would one suggest for a good Cocoa book?
  14. mduser63 macrumors 68040


    Nov 9, 2004
    Salt Lake City, UT
    Cocoa Programming for Mac OS X by Aaron Hillegass (Second Edition). I got my copy at the local Barnes & Noble.

    Go through Steve Kochan's book first though, because Hillegass assumes you already know C or Objective-C.

Share This Page