On Writing a C++ Book(lospi.net) |
On Writing a C++ Book(lospi.net) |
It has been a few years since I did any C++. I looked into it when C++11 came out and it was very much like a new language with foundations of the old language I both loved and hated. Since then I haven't had a need to use it. However I have a few little side projects I want to work on and C++ would be a fine choice for most of them so perhaps I will sit down sometime and get myself acquainted with the newer standards.
Side note: I was gifted a copy of Professional C++ by Gregoire a few months ago so if anyone reading this has read the 4th edition it would be nice to know if this is a good book to get myself up to speed again or if I should look elsewhere :)
"It took twice as long to write half of what I proposed. I began writing a projects-based C++ book with a short introduction to the language." Well done for pushing through. It's really easy to become totally discouraged.
I took that to mean that it is now in the process of being published.
I used C++ somewhat, almost 20 years ago, before discovering Python, but I never got very good at it. Over the years I wanted to strengthen my C++ skills, but I never found quite the right material or avenue. Most books/tutorials are too basic for me, others already assume a certain familiarity with C or C++. Maybe this book is better...
Do they? I tend to find that C++’s features are often quite disjoint, which means that you can pick-and-choose which bits you want to use but the language isn’t quite designed like a coherent whole as some other languages are.
My favourite example is Python, I started using it with version 1.6 and even though I only use it for small scripting tasks, always followed each release since then.
It might appeal to beginners, but underneath lies a language as powerful as C++, where even the most savy will fail to remember what changed between minor releases.
I'm also quite sure that we will see similar issues with other languages in the coming decades, with new paradigms becoming popular and existing languages trying to retrofit those in their design. C++ is one of the oldest and biggest (in term of usage) language that is still used for new projects and evolving, the competition is one or two decades younger, they still have plenty of time to evolve into monsters.
Many more modern Languages like Java, Python, Rust and Go have practically only one compiler/reference implementation and a couple of much less popular ones.
Amazon link: https://www.amazon.com/Tour-2nd-Depth-Bjarne-Stroustrup/dp/0...
C++ Primer, by Stanley B. Lippman, Josée Lajoie, and arbara E. Moo. Really huge book, 970+ pages. Covers almost everything from the language, updated for C++11. I wouldn't use it as a beginner though.
Amazon link: https://www.amazon.com/C-Primer-Stanley-B-Lippman-ebook-dp-B...
The first one is really nice introduction, I picked it up a few months ago to learn the language. Quick read, simple to follow, I really enjoy this book. The second one works as a reference as it goes way more in details and covers a massive amount of stuff!
Cargo does a fantastic job for Rust in this regard. Rust won me over.
Cargo - that's exactly what I would love to have in C++. Probably there is something that I am just not aware of as I do not do a professional cpp development.
My three favorite C++ books are C++ Common Knowledge, Modern Effective C++, and Effective C++. Two of those predate C++11, but most of the advice is still applicable.
As for introductory texts, I guess there's: Accelerated C++, C++ Primer, Discovering Modern C++, A Tour of C++, and of course C++ Crash Course (the book under discussion).
I wouldn't get too hung up on "modern" C++. The vast majority of C++ programmers learned the old stuff (the vast majority of which is still valid), then caught up on the new stuff with Effective Modern C++, blog posts, etc. Just as it's useful to know C before you learn C++, it's useful to know old C++ before you learn modern C++.
There are definitely varying opinions on this. If you look for C++ courses for beginners they mostly do not start with C these days. I'd be surprised if any courses currently being taught don't start with lots of std library stuff (especially vector, string, map, etc...).
It's relatively short (~250 pages) and simple to start with. And the second edition is updated to C++17, and covers a bit of C++20.
I'd vote for "Beginning Game Programming in C++" as a self-study book, and "Programming: Principles and Practices Using C++" if you have somebody more experienced that can help you set your environment.
I'm not a proficient C++ programmer, but it appeared to me that there aren't that many programmers who know or even use the complete standard?
Many think that they know what they are using, but never bothered to actually read the language reference manual.
C++ is very fast and entrenched in a few markets ( gamedev, trading, etc) but that's it. As a language it is quite average, encumbered by too many features, too many corner cases.