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

If you want to learn more, I'd suggest at first reading (or at least skimming) Bjarne Stroustrup's "The C++ programming language".

Also, the C++ FAQ http://www.parashift.com/c++-faq/ is useful for getting an overview on the corner cases of C++.

After which you should visit its inverse, the C++ FQA (frequently questioned answers, i.e. an anti-C++ answer to the FAQ) http://www.yosefk.com/c++fqa/ to learn why no-one in their right mind would ever use C++.

That won't teach you C++ per se, but would give you a useful look at the breadth of the language and how and why things happen the way they do.



Thanks. I have got a copy of a Stroustrup on my shelf (I think it's a standard library reference, not the language definition) and I've been developing in "C with classes" for a while, so I've discovered quite a few of the pitfalls. I prefer to let clang++ point out when I stumble across something insane, like:

    vector<vector<T>>  // wrong, uses a >> operator?!
    vector<vector<T> > // compiles correctly.
In some ways I prefer what Objective C did, as a proper superset, and in others I'm drawn to projects like Cello[1]. I'm happy with using (and knowing only) a very small set of C++ features, especially where they're useful for defining simple algebras for objects! I'm sure I'll find another feature I like one day - this one (GGP) may be one of them.

There is one OSS project I know that I never want to emulate: the code literally fails to compile via the python installer until you have run the makefile at least once, by which time it's finished generating all the header files. Whiskey Tango Foxtrot!

[1] https://github.com/orangeduck/libCello


I'd like to mention that, while the FQA pulls no punches and is often sarcastic or worse, it's still a great read and will teach you a lot about C++ even if you disagree with the idea that nobody should use the language. Don't be scared off by that "no-one in their right mind" thing.

Although, if you read through it and subsequently decide that C++ is not the best language to use, I wouldn't call that the worst outcome....




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

Search: