
On Writing a C++ Book - jalospinoso
https://lospi.net/c/c++/programming/developing/software/2019/07/28/cpp-crash-course.html
======
satysin
C++ isn't my favourite language but it does have a special place in my heart.
It wasn't the first programming language I learnt (that was Visual Basic) but
it was the first language I did something _serious_ with that was used by
other people.

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 :)

------
filereaper
Once you've become familiar with the basics of the language, I highly
recommend taking a look at C++ Core Guidelines

[https://github.com/isocpp/CppCoreGuidelines](https://github.com/isocpp/CppCoreGuidelines)

------
timClicks
Wow, well done! Will pick this up once Rust in Action is finished.

"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.

------
ausjke
is this out? No Starch still shows "early access" and "be ready in September",
amazon showed it will be released on September 10, 2019. The TOC looks good to
me. I hope it has a sample chapter.

~~~
dustfinger
>I’m also beyond elated that it’s getting published

I took that to mean that it is now in the process of being published.

~~~
jalospinoso
Yes! Going through production/printing rites now. No firm date yet, I'm
guessing low numbers of weeks.

------
bayesian_horse
Sounds promising.

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...

------
saagarjha
> C++ has a daunting reputation because its fundamental elements nest so
> tightly together

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.

~~~
pjmlp
Any language that grows big has that problem.

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.

~~~
shaklee3
As much as a like python, it is not as powerful as c++. Hence the reason you
have to use cython/cpython to improve performance.

~~~
LBarret
Powerful doesn't mean fast. Python is quite slow but C++ is not powerful
enough to make so many things usable without -comparatively- a lot of work.

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.

------
lone_haxx0r
Interesting that the author didn't include C++ Primer in his list of
favorites. It's not perfect, but I think its latest edition (C++11) is a
pretty good way to learn C++ currently.

~~~
copperx
Do you mean A Tour of C++? That's an excellent introduction by Bjarne himself,
but does not talk about some things such as the Boost library.

~~~
dgellow
A tour of C++, by B. Stroustrup. Short (~250pages) and accessible introduction
to the language and libraries. The second edition has been updated for C++17
and some parts of C++20.

Amazon link: [https://www.amazon.com/Tour-2nd-Depth-Bjarne-
Stroustrup/dp/0...](https://www.amazon.com/Tour-2nd-Depth-Bjarne-
Stroustrup/dp/0134997832)

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...](https://www.amazon.com/C-Primer-Stanley-B-Lippman-ebook-
dp-B0091I7FEQ/dp/B0091I7FEQ)

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!

~~~
reflexer
Primer is a really dry reference. It was too boring for me to read it in
order. Too many details on not very fun topics from the beginning.

------
tasubotadas
Did I miss or there isn't a section that covers modern build systems? I would
have loved to get an intro to that.

~~~
reacharavindh
I was also thinking the same thing after glancing at the table of contents. I
remember working with C++ while studying at grad school with instructions by
two professors who quite loved the language. Even though I enjoyed the
language and its STL very much, the mess of its build system and linking to
other libraries is what comes to my mind whenever I think about C++. This is
exactly why I never touched it again.

Cargo does a fantastic job for Rust in this regard. Rust won me over.

~~~
tasubotadas
>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.

------
rememberlenny
As a dabbler in hardware and edge deployed machine learning models, this is
exactly what I’ve been looking for.

------
la_barba
Which version of the C++ standard is this book targeting? Also, any links to
reviews?

------
zerr
What would be the modern (14/17/20) C++ as the first language book nowadays?

~~~
SloopJon
Everyone has a different path, but frankly, I wouldn't recommend C++ as a
first programming language. It's much easier to comprehend if you have some
background in another language.

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++.

~~~
criddell
> 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...).

