C, C#, or C++?

Discussion in 'Mac Programming' started by XIII, Aug 29, 2005.

  1. XIII macrumors 68040


    Aug 15, 2004
    Hi. I've decided I'm going to teach myself some form of programming, and have sort of decided that C seems to be the most useful. I then find there are three forms of C... C, C#, and C++. What do each of these do, and which is easiest to learn? Thanks.
  2. mspock macrumors newbie

    Aug 26, 2003
    dont forget objective-c

    hi, i just started programming myself 2 weeks ago.

    Im taking class in html and CSS, that will be follow after christmas with a class on php and mySQL. Im learning java by myself, and next year i have a class on c++ using Borland C++ builder on PC.

    If you are posting on a macintosh site, i would assume that you would like to program on your mac. Then u need to learn Objective-C, wich is a object oriented language use in mac os x. Then learn Cocoa for the design of interface...

    You can also learn java, wich is crossplatform and a good language to start with (i dont usually recommend alot of book from them, but Barry Burd's "Beginning programming with java 2nd edition for dummies" is a must have for the absolute beginner. It wont be a reference book on java, but it will teach you how to understand alot of programming concept that you will encounter in all object oriented programming languages. Plus, it give you a pretty good start in java.

    U can use Xcode to code in C, C++, objective-C and java (and more). its a pro IDE (integrated developpement tool) that come bundle on every mac. Just install it from you os x cd/dvd.

    For java, i would recommend Eclipse 3.1, wich is an open source IDE, or JCREATOR from Sun (have to buy it).

    What i love about learning java, is that you can use your knowledge to build good desktop app, and use it for developping with java enterprise platform (J2EE) for server/client app, etc. It is widely use (in competition with .net).

    hope that help !
  3. matthew24 macrumors 6502


    May 30, 2002
  4. Linkjeniero macrumors 6502

    Jan 6, 2005
    I've been programming for a while now, and I recommend you to start with Java. Much more forgiving to newbies, and lets you concentrate on learning instead of fixing obscure errors; also Java programs run everywhere. When you're ready to move on, learn C or C++ (the difference between them is that C++ is object-oriented and C is not), but not C# (wich is another MS "improvement" that only benefits them).
  5. lexfuzo macrumors 6502

    Mar 15, 2005
    The heart of Europe
    If you are an absolute beginner I suggest that you try Python (http://www.python.org) It's a lot easier to learn than C or Java. It's portable, too, there is a python interpreter for all important operating systems.
  6. zv470 macrumors 6502

    Jul 4, 2004
    New Zealand
    Yes definately start with Java and then move on to C++. Here is a run-down...

    Java is easy and you'll learn about Object Oriented Programming (OO).

    C++ is great (and it's OO), but difficult to debug for the beginner.

    C encourages structured programming which is quite different to OO. Also C is difficult to debug.

    Objective-C is an OO version of C.

    C# is Microsoft's own programming language.

    Get yourself a good beginners book on Java and download Eclipse from www.eclipse.org
  7. greatdevourer macrumors 68000

    Aug 5, 2005
    Do either C or Java, then move to C++. Stay away from C#, as it's M$ only and it sucks ass
  8. XIII thread starter macrumors 68040


    Aug 15, 2004
    Thanks Guys. Thats just what I needed. I'll have a go with some Java for Dummies books (;)), and see how I get on. When I feel like I can move on, I'll try some C or C++.. Thankyou all, for your quick and informative answers.
  9. plinden macrumors 68040


    Apr 8, 2004
    If you get into Java, also read Effective Java by Bloch (not right away, learn the language first). It'll help you avoid the pitfalls that many Java newbies fall into because Java is so easy to use.
  10. XIII thread starter macrumors 68040


    Aug 15, 2004
    Ok. Are there any other absolute beginners books for java I should get hold of?
  11. plinden macrumors 68040


    Apr 8, 2004
    Try Bruce Eckel's Thinking in Java from here http://mindview.net/Books/TIJ/DownloadSites - I don't know if it's the best, but it's free. It has plenty of examples. Get the 3rd edition
  12. Vanilla macrumors 6502a

    Mar 19, 2002
    Atlanta, GA
    I'm working my way through Sams "Teach yourself Java 2 in 21 days" and so far (day 4) I've found it very informative, easy to read and educational. I'm coding the examples using Eclipse 3.1, which is a great piece of open source software.

  13. HiRez macrumors 603


    Jan 6, 2004
    Western US
    I would recommend Java if you are self-teaching programming, for the huge number of resources available, both printed and beginner-friendly online tutorials and references. C and Python would also be good choices, but I think Java would be easiest to start with. I would teach yourself C at some point anyway, as so many other languages derive from it (including Java, in part).
  14. XIII thread starter macrumors 68040


    Aug 15, 2004
    Thanks, I'll look through some free resources for java, and maybe buy a book. :) Here goes nothing! :D

    Just as a side note, how long do you think, before I can create something I will be proud of? :)
  15. ham_man macrumors 68020


    Jan 21, 2005
    C# is the devil.

    ANSI C. Objective-C is built on C and that is what you will most likely want to step up too for Mac programming...
  16. seriypshick macrumors member


    Apr 4, 2005
    Same thoughts here.
    Objective-C is 'the mac language'. It's based on C. Therefore You should learn C before you dive into any OOP(Objec Oriented Programming). Then when you get the basics go for Objective-C.

    I have been learning programming for around a year. I have yet to create something that I can be proud of.
  17. VanMac macrumors 6502a


    May 26, 2005
    Rampaging Tokyo
    I agree with the learning Java posts.

    'C' would be a waste of time, unless your gonna writes some device driver of some sort, or maintain some legacy code.

    C# is microsoft code for .net crap. Ughhh.

    Java will serve you well. It is platform independant, so it will run on mac, unix, windows, etc. You will also learn OOP concepts which is good. Procedural languages are dead, so again, no point in learning the old way of doing things. (and before someone flames me about that, I've been coding for over 15 years, so I'm accustomed to the 'old ways' ).

    Also visit http://java.sun.com and post messages in their "New To Java" forums. You will get very good responses. (as long as you dont ask them to do your homework for you).

    Happy coding :)
  18. Nutter macrumors 6502

    Mar 31, 2005
    London, England
    I strongly disagree with the statement that learning C is a "waste of time", particularly if you are interested in programming for the Mac. Objective-C is a very simple and elegant extension of ANSI C, so if you start by learning C you will feel very comfortable with Objective-C syntax.

    I would recommend that you consider starting with Steve Kochan's excellent book, "Programming in Objective-C":

    This book doesn't assume any prior knowledge of C, so it is a perfect way to get to grips with the language straight away.

    I wouldn't recommend that you learn Java if you are likely to want to program serious applications for the Mac.
  19. Tahko macrumors regular

    Jun 11, 2005
  20. petej macrumors regular

    Jun 9, 2004
    Whilst I am a hater of C#, I am shocked at how it is now starting to make inroads into some industrial sectors. Thankfully, this only seems to be for relatively small extensions to business software packages, but it is creeping in. In that sense, time spent learning C# now may not be wasted time.
    C++ would be first choice for me out of your shortlist.

Share This Page