Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26
  1. #21
    Join Date
    Jun 2009
    Posts
    27
    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:


    http://www.cplusplus.com/forum/general/134/
    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++.


    http://www.cplusplus.com/forum/beginner/34078/

    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.

  2. #22
    Join Date
    Jun 2003
    Location
    Trier, Germany
    Posts
    1,350
    owensd has a valid point though.

    my estimate for a talented beginner to learn to write decent c programs would be something around 6 months of programming experience (as in, 40 hours a week of coding challenging, non-trivial programs). for c++, though, that would be 5 years at least. these are just numbers from my experience and ymmv greatly depending on what your definition of a 'decent program' is (mine is: something i'd be willing to pay a programmer for, but that's again far from objective ).

  3. #23
    Join Date
    Jun 2009
    Posts
    27
    On further research, it seems that the opinions on whether C is important to know or not are more mixed:

    http://langpop.com/

    And Lynda.com finally has released a C/C++ tutorial series, in which they recommend learning C along with C++:

    http://www.lynda.com/Eclipse-tutoria...g/94343-2.html

    But when the question is answered on various forums and such, it seems more commonly opined that C is not important if seeking C++ eductation.

  4. #24
    Join Date
    Jun 2003
    Location
    Trier, Germany
    Posts
    1,350
    the main thing to keep in mind here is that c and c++ are different languages. just because something is a good solution for a problem in c, does not mean it's also a good solution in c++. hence the required 'unlearning of bad habits' when switching languages. unless you insist on keeping to write c++ code in a c-style, that shouldn't be a problem though.

    disclaimer: i personally started out with c and wrote c-style c++ for quite some time. this was mainly due to lack of mentorship and the influence of some game programming books of questionable quality (stay away from those, kids! they might be shiny on the cover, but they are bad for you, mkay ).

  5. #25
    Join Date
    Feb 2005
    Location
    Bellevue, WA
    Posts
    3,251
    I wasn't making a comment about whether you should learn one or the other or in which order you should do so. C is a fairly minimal language with a small number of constructs; C++ has many constructs and much more depth than C.

    I was just making a comment about how I thought it was funny that C++ was being said to be less cryptic and friendlier than C. Sure, you if ignore much of C++ and essentially only use the OOP side of it it is not too bad, but once you start delving into the evil (yes, evil I say!) that is templates, have fun! =)

    I personally stay away from C++ as much as possible, and fortunately, I can do so a good portion of my time.

    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." ~Rich Cook

  6. #26
    crazyresidentev Guest
    I never got the chance earlier to say thanks to everyone for responding, I'll try my best to understand it and hopefully get your full support again.

Page 3 of 3 FirstFirst 123

Posting Permissions

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