Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A discussion which was inspired by this rant by Linus Torvalds on Stack Overflow: http://stackoverflow.com/q/1995471/89391 (Is learning C++ a good idea?)


I don't know C++. The accepted response does not start off well.

"C++ is a complex language, and if you don't learn it properly, it's very easy to shoot yourself in the foot. And that is also why you shouldn't listen to most non-C++ programmers hate towards C++. Most of the time, they didn't learn the language properly, so they're not really able to judge the language"

What does that mean? It sounds like, that without some significant amount of knowledge, you can't understand it's benefits.

Thinking of the languages I know, I think the things they are trying to improve are apparent with a basic knowledge of the language.


Most people learn C++ as a feature-by-feature increment over C. This means they generally write function-oriented programming with objects instead of object-oriented programming, mix exceptions with returning errors, stick with pointers and char*'s instead of references and string's, and end up rewriting data structures before finding out about STL.

That being said I use some features of C++ I like (inheritance and STL) and while the result is somewhat bastard C/C++ it does what I need well, which at the end of the day is all we should really ask for from a language.


To avoid confusion, the link is "A discussion on Stack Overflow which was inspired by this rant by Linus Torvalds"




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: