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
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.![]()
proudly presenting my personal website and game website: F1Simulation. a thrilling Managed DirectX racing game... also my Ask Me
look at my tutorials about cropping images and Mono: bundling Mono with programs and lambda expressions
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.
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++.
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?
I've read about some of them. I think it'll be very good.
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++.
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.
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
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks