Closed Thread
Page 3 of 7 FirstFirst 12345 ... LastLast
Results 21 to 30 of 64

Thread: C necessary before C++?

  1. #21
    tossy's Avatar
    tossy is offline Programmer
    Join Date
    Aug 2008
    Posts
    199
    Rep Power
    14

    Re: C necessary before C++?

    I would say its good if you learn C, you can get a knowledge and its easy to find a difference with other languages.
    Microsoft: "You've got questions. We've got dancing paperclips

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #22
    Join Date
    Mar 2009
    Posts
    1,375
    Rep Power
    24

    Re: C necessary before C++?

    Many people say that learning C is somewhat helpful, because you can spot the differences between them. Perhaps I could conclude, that learning any language is helpful, since it widens your imagination and experience.

  4. #23
    outsid3r's Avatar
    outsid3r is offline Programming God
    Join Date
    Jul 2008
    Posts
    621
    Rep Power
    19

    Re: C necessary before C++?

    I would like to cite some words from Bjarne Stroustrup that are important for you to know:

    (From The C++ Programming Language 3rd Edition)


    The better one knows C, the harder it seems to be to avoid writing C++ in C style, thereby losing some of the potential benefits of C++.

    Knowing C is not a prerequisite for learning C++. Programming in C encourages many techniques and tricks that are rendered unnecessary by C++ language features.

    In the continuing debate on whether one needs to learn C before C++, I am firmly convinced that it is best to go directly to C++. C++ is safer, more expressive, and reduces the need to focus on lowlevel techniques.

    C++ is a language that you can grow with.

  5. #24
    Join Date
    Jul 2006
    Posts
    16,486
    Blog Entries
    75
    Rep Power
    143

    Re: C necessary before C++?

    Further, C requires you do do a number of things that are required bad practices in C++. Macros, casting, null terminated arrays of char are all standard practice in C, and considered bad practices in C++.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  6. #25
    outsid3r's Avatar
    outsid3r is offline Programming God
    Join Date
    Jul 2008
    Posts
    621
    Rep Power
    19

    Re: C necessary before C++?

    Exactly. In my opinion C++ is the best overall language due to the great features it has and big expressiveness it possesses. And the new C++ standard looks promising, have you checked the new features?

  7. #26
    Join Date
    Jul 2006
    Posts
    16,486
    Blog Entries
    75
    Rep Power
    143

    Re: C necessary before C++?

    I've read about some of them. I think it'll be very good.
    Programming is a branch of mathematics.
    My CodeCall Blog | My Personal Blog

  8. #27
    Mathematix is offline Programmer
    Join Date
    Jun 2009
    Posts
    112
    Rep Power
    0

    Re: C necessary before C++?

    Quote Originally Posted by Sanity Pig View Post
    Just having finished Intro to Comp. Sci. my Sophomore year of High School, I wanted to expand my horizons into C/C++ (being that many video game companies require that in a programmer, and that is what I aspire to be, a video game programmer). But is it necessarry to learn C before C++?

    I have gotten some mixed results from googling this. While my mom (she is a programmer, long forgotten C/C++) says that I should/it wouldn't hurt, many people on the interwebz seem to think otherwise.

    I have been lurking around this website for a wee bit, and everyone here seems very (more so than I, at least) knowlegable about these types of things, so I opted to ask.

    Oh, also I spent that year of Comp. Sci. with Java, if that makes any difference.

    Thanks!

    Side note:
    If there is any other advice you have for a new programmer, it would be greatly appreciated!

    EDIT: Just noticed the "FAQ" thread. I appologize in advance if this would have been better suited to go in there instead!
    Forgive me for being late to the party and maybe skipping over what has already been said, but lunch is coming to an end so I must be brief.

    I currently work in the video games industry and here are my experiences so far:

    1. I learned C before C++ which helped a great deal for programming games.
    2. If you look at how games are coded you will notice a blend of both C and C++ with a strong weight towards C. I also use mainly C in my home projects because I feel that I can work closer to the hardware.
    3. In games fast, clean code is critical for great performing games and C provides the programmer with more control over the precise implementation of their game. Ever wonder why the STL is omitted from professional code? Because it is slow for a variety of reasons.
    4. Why do we bother with the C++ aspect? Because it allows us to group everything from the specifics of the overall game architecture to asset loading (textures, models and their attributes) with a class structure and determine who inherits what from where. C is more a procedural language making this activity difficult and quite impossible for other desired features.

    Generally in education, at least when I was a student, it is normal to learn a procedural language before moving onto a object oriented one, and since C++ can be a nightmare for many to get their head around, I would advise that you do learn C in the first instance to get your head around the C language quirks before moving onto the higher-level features of C++.

  9. #28
    CCC
    CCC is offline Newbie
    Join Date
    Jun 2009
    Posts
    15
    Rep Power
    0

    Re: C necessary before C++?

    C is much better designed language than C++ and is a must, if you plan to write drivers, embedded software, operating systems or multi-platform libraries (C works fine on much larger number of platforms than C++). In many aspects C++ design has been broken by keeping backward compatibility with C. And some features, which shine in C (like headers) are a horrible nightmare in C++.

    Read the C++ FAQ if you don't believe me.

    >And the new C++ standard looks promising, have you checked the new features?

    The new C++ standard breaks this language even further making it the most unneccessarily complicated language in the world . If you want OOP, go with Java or C#. If you are a pro wanting a really expressive and powerful language go with Scala. If you want a better C++, go with D.

  10. #29
    Join Date
    Jul 2008
    Location
    Somewhere that is shorter to write than "In the gloomy shadows of my personal namespace"
    Posts
    10,725
    Blog Entries
    2
    Rep Power
    90

    Re: C necessary before C++?

    I disagree with the above poster. In my opinion, the backwards compatibility with C is a good thing. It allows C++ coders to choose the right tool for the job, and combine the tools. C++ remains the fastest OOP language in the world, and should not be neglected.

    And what is the thing about headers being a nightmare? :S

    Posted via CodeCall Mobile

  11. #30
    CCC
    CCC is offline Newbie
    Join Date
    Jun 2009
    Posts
    15
    Rep Power
    0

    Re: C necessary before C++?

    The idea of headers was totally broken in C++. Headers are meant to separate the interface from implementation. It is so in C, but not C++.
    In C++ private class members are exposed in header files. And the nightmare starts when you try to recompile large project after such simple thing like adding a new private member to a class - most of your files need recompilation. And if you are a fan of templates - it takes ages, because of another "broken by design" thing: template definitions cannot be shared and the same definitions need to be recompiled again and again.

    I think the root of the problem is that C++ supports OOP, but is NOT modular, like Pascal, Java or C#.

    >C++ remains the fastest OOP language in the world

    The fastest in what? In coding time? You must be joking...
    In fixing bugs? Dreaded segfaults are waiting to hunt you...
    In execution speed on server? Java in multithreaded environments beats its pants off.
    In numerical applications? Fortran compilers STILL do better.
    In window/desktop apps? Speed doesn't matter here. Even Python is fast enough.

    The only thing which comes to my mind is... 3D games. Yes. Here C++ still rocks.

Closed Thread
Page 3 of 7 FirstFirst 12345 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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