Hacker News new | ask | show | jobs
by PLejeck 4637 days ago
I'm slightly afraid to learn C++ after being told so many horror stories. But for the low low price of free? Count me in.
2 comments

Forget about the stories. I have quite some experience with both C and C++, started with C. There's horror in both of them, if you do it wrong enough. Oh yes there's more horror in C++, there are more ways to do it wrong. But in the end it comes down to the same: learning curve. If you know it well enough there's no horror anymore, just joy.
Agreed, specially since C++11 provides better mechanisms for writing safe code if one needs to stay in C++ world.

Now C is a different matter.

Here's a little secret, guys: It's not the language that is bad. Although a lot of things can go out of hands and most of the added features seem extremely "tacked on", at the end of the day, it's us, the programmers, that write the bad code. C++'s main problem is allowing people to write stupid code... but then again, stupid programmers are stupid programmers, no matter the language... plus, every mainstream language has a lot of stupid programmers using it :)

Still, if you look at the Chromium code, or the Doom 3 BFG Edition code, it's really neat and readable.

If you need C++ for a living then you have no other option. If you want to enjoy programming then I recommend to stay away from C++. I have written a lot of software in C and C++ in my programming career but C++ is not fun anymore. There are so many (even free) implementations of better languages. For instance C#, Python, Go.

If you want to learn a next generation language right now then you should look at Rust. It seriously has the ability to replace C++ in the long term. C++ will be remembered as the third dino besides Fortran and Cobol.

http://www.rust-lang.org

You think Rust is beautiful but C++ is ugly? You don't know what you're talking about, do you?