Results 1 to 10 of 26

Threaded View

  1. #21
    Join Date
    Jun 2009
    That ton of added stuff results in very different methodology and concepts between the two. The universal consensus in my search on the subject (just from wondering where C still applies these days) is that C++ is an easier and less convoluted language for beginners, and that the concepts involved in programming with either differ greatly:
    It boils down to the need to have tools to allow OOP -- Object Oriented Programming. In OOP the primary focus is on the data, rather than on the methods used to manipulate it. The OOP approach of C++, in other words, is a quite different programming philosophy from the function centred approach of C.

    All this means that whether you know C or not is a double-edged sword. On the one hand, knowing C is good because it means you already know alot of the basics which have transfered over to C++. On the other hand, knowing C is bad because it is uses an entirely different, non-OOP approach to programming and so teaches you what are "bad habits" from an OOP perspective.

    I'd say, however, that for a person who doesn't already know C, it makes very little sense to first learn C and THEN try to learn C++. Yes a knowledge of C will give you certain basics which are useful to know -- but if you're starting from scratch, you'll learn those basics just as well if you begin with C++.

    Starting with C won't help you learn C++. If anything it will only make it harder to learn C++ because you'll have to "unlearn" a lot of things C will teach you.
    Learning C gets you started doing things you shouldn't do in C++. Like use char arrays, malloc, printf, macros, etc, etc.

    C++ has superior substitutes to all those things that are easier to use and harder to screw up. You're better off just starting with C++.
    And I can't think of a time where I've ever had to use variable arguments. That probably could be an example of something C teaches you that you'll probably have to unlearn for C++.
    C teaches an entirely different style of coding. Most of it is considered bad practice in C++
    Yes C and C++ share syntax, but using the languages is done very differently. C++ is more than just "C with classes". Coding effectively in C++ takes a completely different mindset than coding effectively in C. And learning the mindset of one does not prepare you to learn the mindset of the other.

    Good C coders can make terrible C++ coders and vice versa.
    I started with C++, and then learned the C standard library via the C++ headers that make them accessible. Maybe I'm a glutton for punishment, reinventing the wheel several times over, but I love C more than C++.

    I'd recommend starting with C++ simply because it is easier for beginners. Both C and C++ have their negative points (pointers and template hell, respectively), but as the creator of C++ would say: "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do it blows your whole leg off."
    Last edited by Delicieuxz; 08-25-2012 at 09:45 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts