253 points · by dgellow · 6y ago · 322 comments
Nowadays I am using C++ mainly for the high-performance libraries, and only if I can't archive the same in jit-ed python, cython or rust.
The Java strategy of being very conservative about what you add to the frontend would have done C++ a lot of good after C++11 (or even before that).
C++11 introduces hugely useful stuff. I would much rather have it than C++03, c++98, etc.
Whenever I come across things introduced in 14 or 17, I usually evaluate it and say, that addition makes sense, maybe it should have been there sooner. But I am not actively seeking out that information. So I am never up to date.
It is a big contrast from a few decades earlier, where you would expect to use very few new features from the standard for a period of many years. That is also the expectation the C standard gives: it hasn't changed substantially since 1999, and even that you could call relatively minor since 1989. But I still think they are doing a good job with modern c++, even if these old expectations are no longer the case.
Java lost a lot of mindshare to C# and Kotlin due to that "strategy".
C# still doesn't deliver on all platforms where there is a JVM available, and has yet to even offer something as portable as Swing across all those platforms.
Kotlin really only matters on Android.
In fact right now we are having issues with .NET RFPs, because everything that comes through the door are Java related RFPs.
There was a 8 year gap where C# users could use stuff like enumerable operators while Java users were stuck in the stone age of writing loops for collection manipulation in a high level language ...
- No checked exceptions
- Properties (I wish Java would add this to the core language instead of relying on things like Lombok as it shouldn't change the IR and really is just syntactic sugar)
- Partial classes. This really isn't in contrast to Java because Java has nothing like it. But it is a neat feature for partial code generation;
- LINQ. Java eventually added streams but last I checked it still had performance issues and IMHO LINQ is just cleaner;
- Conditional compilation. This is really a huge oversight. One of the huge benefits of the preprocessor in C/C++ was conditional compilation. It's great than C# included it. It's bizarre to me that Java hasn't.
- Async/await. Honestly I still find C#'s version of this more awkward than Hack's. Experience has taught me that whenever you spawn a thread, you've probably made a mistake as subtle mutlithreading bugs are the devil and cooperative multitasking like you have in Go, C# and Hack is usually far safer and sufficient most of the time. Still, C# is still better than Java here.
- C#'s reified generics vs Java's type erasure. I think it was the right decision to break backwards compatibility here (and I don't usually say this). This was pretty early too (IIRC generics were added in C# 2.0).
But all that being said, I still think Java has a large mindshare and install base than C# by a mile. it's not sexy so it gets less attention on HN but Java is still massive.
As for Kotlin? Much like Scala I see this as nothing more than a curiosity. Android developers seem to like it but I think it's a tiny fraction of Java still.
The C preprocessor can make it way to easy to break code, for example when it is used for feature flags and/or multi-platform support. If you have N feature flags, you have to compile 2^N different programs. Multiply by M for supporting M platforms.
It also makes it impossible to check whether source code can be compiled. The text inside a
#ifdef FOO
...
#endif
block doesn’t have to be valid source code, but the compiler cannot know whether it has to be.
I think that’s why Java ditched it, and I think that makes sense. Adding a more limited feature, like C# did, makes sense, too, though. I’m not sure C#’s variant is limited enough, though. it still is subject to that 2^N problem, but gets saved from its main problems because C# isn’t running on as diverse environments as where lots of C code evolved.I feel like a lot of languages these days trend towards "kitchen sink" languages that toss in everything and the kitchen sink in the name of clean looking code. IMHO this tends to sacrifice language elegance. This is probably why I tend to like languages like Java/Go/Clojure.
Java is massive for legacy reasons, but would be nice to have some statistics regarding new projects. The last two companies I've worked for had backend teams using Kotlin so I've been assuming this is also preferred by backend people. Could well be that this has was an anomaly though.
I mostly develop for Android so my own perception is obviously biased, as Java is pretty thoroughly erased from this world now.
See virtual threads vs async/await. Java's version is going to be better.
I rely miss checked exceptions on .NET, specially with libraries that provide zero documentation about their exceptions.
If we look at programming languages as tools, it makes sense for them to get out of date and new ones taking their place, with all the lessons learned.
So its possible that programming languages like C++ that keeps extending their own life through adding features (while keeping weaknesses), will ultimately cost the community/industry more in the long run.
They did add those features eventually (Java 8) - about 8 years behind C# (since C# 3.0)
Part of me thinks that this is how it should be. Extending a language constantly while providing backwards compatibility can lead to some awkward syntax too.
But of course, I'm sure Oracle is a big reason too.
People put scare quotes in seemingly at random these days - are you suggesting it's possibly not their strategy and actually they're lying? What do these scare quotes mean?
It is quite marvellous in a way, almost a statement of "we don't want design, we just want something that compiles". It has worked out remarkably well in practice.
And C tends to reinvent object oriented programming with each library so you might as well use language defined classes.
So I don't really see the point.
You don't need to use stuff like concepts, or "showing off how smart I can be with template libraries" (looking at boost), but C++ has a lot of features that make it much more productive than C.
Sticking to plain C has the advantage of probably being the subset of C++ (I know, it’s not technically a subset) that’s in widest use.
I prefer using C++ like "C but with cin and cout" and I informally call it C+ :)
Is it not? I thought C++ was explicitly a strict superset of C?
* creating more work for yourself, and
* introducing bugs in your code.
Don't do that. Use C++ as C++.
I would agree that the Python ecosystem is as complex as the C++ language.
I would not agree that the Python language is as complex as the C++ language, or that they Python ecosystem is as complex as the C++ ecosystem.
I will agree also that the Python language has very comprehensive first-party tutorial and reference documentation, but that doesn't add to the complexity.
An extensive standard library is not the same at all as an large base language size. Adding a million books to a language doesn't make it more complex, adding a million words and verb conjugations does.
Generally, yes for Python (definitely for 2, async shook up 3 a bit), C (barring a few genuinely legacy things like trigraphs), Go, Lua, and I think probably at least 2-3 times a year for anything in Java 12 and earlier.
C++ is the only language I use regularly that I am certain I don't even know of, let alone know or use, all the features of.
Have you really used all of these Python features (from https://twitter.com/raymondh/status/1280988785841278976)?
__class_getitem__, __init_subclass__, __prepare__, __qualname__, __slots__, __spec__, __annotations__
__subclasshook__, __abstractmethods__, __text_signature__, __index__, __loader__, __mro__
I've been writing Python for years, but I've never even heard of half of them.
I'm still holding out some hope that Stroustrop releases a new edition of "The C++ Programming Language" with the features from C++14 onward.
Doesn’t really make sense why you’d want to anyway. Why would you want to use all of any language? C++ offers so many features because of its extraordinary flexibility and application to a wide range of domains. Unless you’re writing an app that is a game that also trades high frequency transactions on the financial exchange, while performing physics simulation and 2-D vector rendering, all while serving up a Web server, it would not make sense why you need to use all of the language. It’s perfectly fine to find those parts of a language that you are personally interested in.
I remember starting out with Python and only knowing a subset of it, but as soon as I started writing real apps that interacted with the larger Python ecosystem, I found myself having to learn the full language (or at least a lot more than I did writing my own isolated code).
We write our code such that it minimizes the amount of effort to read it, under the assumption the reader knows the language.
This way, it makes sense not to use a library for something that can already be cleanly expressed by the language because this introduces additional mental overhead for the reader.
Yet is doesn't make sense to avoid modern, simplifying language constructions, as we can assume these are known by the reader.
This unwritten contract is jeopardized by an overload of language features, as suddenly we may want to avoid certain features considered complicated. Hence, the notion of optimal code becomes more subjective.
And there are definitely things that these features provide that are impossible in C.
However, the idea that you should learn and use "all of C++" is a mistake to begin with. It's something that sort-of happens with C, but doesn't really make sense with larger languages.
Specifically, remember that C++ is _multi-paradigmatic_ - you can write more object-oriented code, functional code, highly templated generic imperative code, or, well, C-style code. The standard library also now has something for everyone, and there's no reason to know _all_ of it.
On the other hand, many things which used to be difficult to write and required some deep "voodoo" or a lot of boilerplate are easier and more straightforward these days.
I agree in general, but still, some of the newly introduced features are actually awesome. Here’s ones I’m using almost every day.
C++/11: initializer lists, range-based for loops, strongly-typed scoped enums, raw and UTF8 string literals, thread_local, thread synchronization classes including atomics, alignas
C++/14: binary literals
C++/17: if constexpr, std::string_view, better static_assert
And in C++/20, pretty sure I gonna use std::span and std::bit_cast.
In C++ we don’t pay for features we don’t use. I’m totally fine with other people getting the features they want (despite finding them unreadable and overcomplicated), I simply don’t use the stuff I don’t like.
The classic example is C++ ranges' pipe operator. If it was implemented in language, like OCaml and Elixir do - There would have been no need to write range adapters - the error messages and debugging could be much better than 100000 line template implementation. - debug build would be fast as well - compile times would not suffer
Implemet-it-as-library is often a leaky, brittle abstraction. That's the reason LISP, with its proclaimed magic capabilities, didn't take off.
The C++ committee seems quite academic at moment. Last time I read C++ performance report, all I could find was some old advice like "use list if you want insertion"™. They didn't mention difficulties in using realloc in vectors. They didn't mention inefficiencies in stl HashMap implementations due to iterator invalidation constraints. They didn't mention exceptions requiring dynamic storage and RTTI. Note that many of these problems are not yet fully solved with move constructors.
At the same time they are also less academic than required. Given how they managed to put pipelines into an ugly template library without any of the considerations I mentioned above.
I can't help but I feel similarly towards all standards committees. The JS standards people are still unable to deliver a standard library, and a "use strict"-like flag that enables easy tree-shaking.
If anyone here is in C++ standard committee, you owe us an answer.
The TR18015 (Technical Report on C++ Performance) goes into details on most of the above (and much more) and it was written in 2006. The only thing missing is a discussion of hash_map as it wasn't part of the standard yet.
Is anyone aware of a library for another language that's as fast as Eigen?
I think it'd be difficult to argue one way or another: Eigen gives you flexibility one way (custom kernels) and Python gives you another (interactive debugging and easy visualization). Cython/Numba make it even more muddied.
We all know the negative parts, any C++ related thread is always full of people repeating them over and over. What about some celebration time for now? A huge milestone for the language has been reached with C++20, can we share something positive about it for once?
IMO, C++ has the following huge benefits.
1. Ambient performance. If you need a fast program and don't have a tight loop you can optimize, C++ makes ordinary behavior fast.
2. RAII is a very clean and understandable design paradigm.
3. The idiom of using "const" everywhere plus widespread copying of values makes "spooky action at a distance" way less common when doing OOP or imperative programming.
RAII is a damned useful idiom too, makes writing safe code that much easier.
Tooling for C++ is pretty damn good in all the usual platforms
i.e. there is no way to end up with faster code that does the same thing, without using the abstraction.
This is the very definition of zero cost abstractions.
Oh yes, that would really be awesome if that's the case. Wikipedia has a section regarding "Compiler diagnostics" when Concepts are used, the precision of the error message demonstrated is SO MUCH better than what you get with templates!
https://en.wikipedia.org/wiki/Concepts_(C%2B%2B)#Compiler_di...
Code example:
std::list<int> l = {2, 1, 3};
std::sort(l.begin(), l.end());
Example with templates: In instantiation of 'void
std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = std::_List_iterator<int>; _Compare = __gnu_cxx::__ops::_Iter_less_iter]':
error: no match for 'operator-' (operand types are 'std::_List_iterator<int>' and 'std::_List_iterator<int>')
std::__lg(__last - __first) * 2,
...
... // continues for 50+ lines
Example with concepts: error: cannot call function 'void std::sort(_RAIter, _RAIter) [with _RAIter = std::_List_iterator<int>]'
note: concept 'RandomAccessIterator()' was not satisfiedA good meta programming language would be one that's as easy to program as a general language. lisp, nim, etc...
I have a lot of experience with many different types of metaprogramming (cl macros, Rust macros, template Haskell (and Typeable/Generic), ... even CLR code generation) and C++ templates are better than everything I've used other than Common Lisp once you really understand them. A really common C++ theme I see is people that don't understand things railing against them (I used to be in this camp myself, so I can identify with the sentiment).
Templates allow you to choose at will between nominal/structural subtyping (in a way), perform type-level logic, generate code that can be thread-safe or lock-free at the caller's whim... They are very powerful, much more than most devs realize, and if you understand C++, writing them is not difficult.
The "really understand them" part is, of course, the hard part. You need to understand the core language and the template language to be effective with them. I can see why even some experienced C++ developers shy away from templates.
I find it much more pleasant to write, e.g., ODBC client code in C++ than in C, and templates have a lot to do with that. I'm not an expert with Lisp macros or other reportedly superior meta-languages, but I will say that when I write generic code in C# or Java, I really miss the power of C++ templates.
Template syntax is pretty awful, and accomplishing what I want can involve some really strange idioms, like SFINAE. The ergonomics are slowly improving with type deduction, constexpr, and now concepts.
Nowadays C++ and a powerful multi-paradigm programming language quite straightforward to use if you forget the word “C” in its name.
If would be a good instructional language if people didn’t fall into the lazy “a horse is a king of animal” OO trope.
But, at least, you no longer have to iterate over arrays with size-1, (size-1)-1 etc these days. We have variadic template expansion, we have the (ugly, still not decent design, but useful) std::integer_sequence , and better still - we have pretty strong constexpr capabilities.
C++ templates are just a compile-time lazily-evaluated Lisp.
As always, the criticism of C++ comes down to "programming is hard, let's go shopping".
If you don't want to learn and you just want to do the bare minimum to keep your 8 hour coding job, there's already plenty of languages that nail this niche. C++ obviously is not for you, just move on and don't make a redundant comment.
D is far more powerful, especially when you consider that it's had working constraints for (?) something like a decade now.
Simple example, try to express this in C++ without a windows full of syntax-soup (https://d.godbolt.org/z/Toc8ob), the template constraint is one line, and I can pass anything into a template using alias be that templates, a string etc.
Passing strings into a templates is a very common trick for generating code at compile time in the D standard library, although it wouldn't work in C++ due to how slow C++ can be to compile some times.
https://www.youtube.com/watch?v=QM3W36COnE4 Here's an example of parsing regular expressions in C++ at compile time. Code here: https://github.com/hanickadot/compile-time-regular-expressio...
* RAII
* lambdas
* templates
* function overloading
* operator overloading (used judiciously)
* inheritance and interfaces (used judiciously)
* an extensive standard library
* exceptions (depends on the project)
For me, the advantages of C++ over C are obvious and IMO there's no reason to use C except for legacy projects or platforms which don't have a C++ compiler.
Of course, C++ has lots of warts and things to complain about, but OP asked for the positive things :-)
I could go on about the bad parts, but the good parts
1. lambdas
2. constexpr
3. threads
These additions did make C++ feel a little more modern.
And this is the "Vanilla" version of the features. In C++17 and C++20, there is all kinds of goodies like concepts and modules that I'm personally excited about.
Hate it all you want, but it's an amazing language.
In fact, it's the one major feature I'd love to start using right away that I know would be immediately useful, but the compiler support isn't there yet. According to this [1], Clang has partial support [2], while GCC has no support at all.
Finally we got modules, concepts will put an end to the fame of endless kilometres of error messages and compile time programming almost allows for static reflection.
It certainly has a lot of warts, but over the past decade, it has become easier and more straightforward to write code in various styles which used to be possible-but-a-pain (like functional programming), or not quite possible.
So with C++ you get performance + backwards compatibility + paradigm flexibility for the price of difficult, sometimes ambiguous syntax, some historical baggage you need to ignore, and slower compilation time. It's a decent tradeoff IMHO.
Specifically, regarding C++20:
* std::span is the best thing since sliced bread. How was this not in the library already? Cuh-razee... https://stackoverflow.com/q/45723819/1593077
* I'm happy that ranges support is inside the language. I can now `sort(my_container)` rather than the clunky `sort(my_container.begin(), my_container.end())` for example. And there are a bunch of useful lazily-evaluted range views. I only wish more of the ranges library could have been added. And I hope the compilation of ranges isn't too slow.
* Modules can now start replacing include files. Initially, this will only be a theoretical possibility, but within several years, no longer will your compiler have to deal with 100,000 lines of text or so per translation unit: It will be like in Java and other languages, where it's just your current file that needs to be compiled and the rest is already compiled. Of course the transition will not be smooth (feature macros, conditional compilation - not obvious to me how to replace them when using modules), but this is a good direction. We could see faster compilation times and content suggestions in IDEs.
* Expanded constexpr support means we can do more work once, at compile time, rather than repeating it at run-time (e.g. dynamic memory allocation - so you can have constexpr std::vector).
* Coroutines are something interesting which I am not familiar with (except the very rough general idea of different control flows being switched between. I can at least say it's interesting to look into.
* libfmt string formatting - Yes, yet another way to format strings: printf-style, iostreams, and now the "Python style", I guess you could say? It combines some benefits of both of the previous ones.
* std::source_location - you know how, if you're writing some error-handling function, you usually need to wrap it in a macro which gives you the filename and line number? Well, that's going away now. I know it's just a minor thing, but I hate having those macro'd error handlers.
* You can now tell the compiler to use a generated equality and comparison operators; this saves you boilerplate. Although in the C++ tradition, this capability is defined in a somewhat convoluted way under the hood.
Highlights for me:
- Type deduction -- basically using auto for variable declarations.
- Move semantics makes RAII actually usable since you can make heavy / important objects but then move them elsewhere and still have their lifetime be automatically managed. I use this in my game engine to wrap physics bodies etc. so that they are automatically removed from the scene when the component containing them is dropped (I'm using an ECS). A neat thing also is you can delete copy constructors and force certain types to be "move-only."
- Having been in C-land for a bit, I'm appreciating the ready availability of std::vector and std::string again. Also std::array is awesome.
- Lambdas are amazing. I often make simple control structure utilities in my modules that accept lambdas, and they are often inlined. I don't often do lambdas where I 'save them and call them later' -- they are mostly immediately called. This makes it safe to use reference captures.
As for C++20 I am mostly interested in seeing how it goes with modules Also the `requires` keyword will simplify some of my uses of `enable_if`.
A lot of the good stuff is also due to ecosystem and tooling vs. just language. My game works everywhere now: native macOS, Windows and iOS, but especially web due to Wasm! It also has an immediate mode API for rendering UI in Wasm, which I use along with some simple reflection to get an automatic entity inspector: https://m.imgur.com/dyUtL8f The entire gameplay code fits in like 700 lines: https://gist.github.com/nikki93/5893543a5e3d76a7858d54b74a4c... You can see how I don't do any pointer stuff or manual recource / memory management there at all.
Tbh in many cases with precompiled headers it almost feels like it builds about as fast as webpack. And then my "publish" is a simple rsync of static files to the server.
Another tooling / ecosystem thing lately has been godbolt.org which is wonderful for seeing immediately the asm that ur code generates. Which then makes you realize how good optimizing compilers for C++ are these days. I don't think other languages have come so far. And then with godbolt.org you can learn which constructs produce what code.
I'm using entt for the ECS: https://github.com/skypjack/entt you can see how it encourages the use of POD structs and non-OO code for the most part. It feels good to use C++ in that style as a C with the above features. I just basically don't use vtables / RTTI anymore. I do use templates a fair amount.
I do concede that this enthusiasm may have a lot to do with having had experience in C/C++ already for a while. If I was completely new to the language it'd be a lot harder. The backwards compatibility lets me keep all my experience (even if the point isn't to write exactly like how I wrote before, but to understand the motivation for the new features). I've also dug into Go, Rust, Nim, Common Lisp, Haskell, ... but weirdly modern C++ has been the best combination of ergonomics, control, and portability. Especially for Wasm you really just want deterministic resource management. I'd probably still combine it with Lua or JS for scripting eventually.
You do have to invest a lot of energy into learning the language and caring about the details, but I think C++ is very well positioned to reward you for that investment, and you are also rewarded continuously and early.
But the module spec feels a bit weird ( https://isocpp.org/files/papers/n4720.pdf ).
I mean, "import M" should create a M namespace with the imported symbols. Here, it's more like "from M import *" in Python.
Evidently, the complexity of finding the same namespace in multiple compilation units has been considered acceptable for C++ modules because it was already handled decently.
But assuming I lose my sanity again and decide to go back to doing C++, which resource would you recommend for properly catching up the last 15 years of C++ changes?
Effective Modern C++ by Scott Meyers (esp. for the chapters on smart pointers).
Arthur O' Dwyer's "Mastering the C++17 STL"
David Vandervoode and Nicolai Josuttis etc.'s "Templates the Complete Guide"
The first chapter of "Elements of Programming" by Stepanov, and maybe the rest if you want.
I think also, just kinda glancing over the spec.
Bjarne's paper on the evolution of C++ from 2006 to 2020 is also important I think: https://dl.acm.org/doi/10.1145/3386320
As for talks, https://www.youtube.com/watch?v=XS2JddPq7GQ is great for value categories and move semantics
https://www.youtube.com/watch?v=St0MNEU5b0o&t=6s also move semantics, and also part 2 of that if you want
I'll add more talks here in a bit!
And honestly if you've liked C, you can get far by just starting with that then slowly adding things you want. I think the first things one may end up reaching for are std::vector / std::string etc.; then being able to attach methods to types, then some templates, some auto, some lambdas. The old vtables / RTTI approach I basically never use anymore.
I really hope that Rust compiler team will investigate in great depth the expert changes in C++20 and backport the relevant stuff into rust
Rust's memory model is by far its most significant advantage over C++, and it cannot be added to C++ without breaking all backwards compatibility.
In addition to that it also protects against the majority of multithreading issues - which is something not even available in managed languages like C# or Java.
Well I see your point, the reality is that this statement is also true of rust itself!
If you're switching to C++ because of performance, you should have probably picked C++ instead from the beginning.
But many performance gains will be automatic e.g http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p072...
So yay, these are improvements, and welcome just like improvements to any legacy system always are. Kudos to the "maintenance programmers" of language design.
Superficially, there's also co_await vs .await.
And, really, async/await is a subset of the C++ feature; you'd want to compare against generators, which aren't yet stable in Rust.
Who says on must know and use all the features of a language (especially the monster like C++) to write good code / software. Check what you really need for your particular task and be happy. I've found modern C++ a breeze to use as long as I do not pretend to be a language guru. Writing some sophisticated STL like libraries is highly specific and involved task and person/s doing that are not doing much of anything else so they would know all the of relevant C++. Using those libraries however is way way easier, the code looks pretty clear.
I use modern C++ to write various business servers. To me it is a single tool or two with clear and relatively easy subset of a powerful language. When I compare it with the monstrosity of some standard "modern" back-end stacks/toolsets C++ is starting to look like a small fish.
English is full of words I don’t use on a daily basis but that doesn’t make it bad.
(Not picking on python btw, just using a prominent example of an alternative path)
I suspect it was not because of C++ but me mentioning a monstrosity of some modern back end stacks. I think people get attached to the way of doing things and it becomes akin to religion.
The issue was that there's no language level definition of module implementation and layout so every build system may need to handle every single module implementation differently. The standard body decided to publish a technical report on this issue to ensure some level of interoperability across module implementations.
(it already does but in a dev branch version, not very handy as it requires a full reconfiguration of the environment variables to switch between this and the normal GCC)
The status is here: https://gcc.gnu.org/wiki/cxx-modules
"[...] because nobody programs in C++ — everyone programs in their own unique subset of the language. If you are told a program is written in C++, that leaves the following questions:
Does it use, or eschew, exceptions? Does it use, or eschew, C++ RTTI? Does it use operator overloading? Does it use, or eschew, the STL? Does it use, or eschew, C++11/C++14/etc. features? Does it use templates? Does it use virtual functions? Does it use multiple or virtual inheritance? Does it use static objects with constructors?"
I doubt that we will see clean modules that are free of preprocessor shenanigans, especially when writing any non-trivial portable library. I am no prophet, but I currently assume that unless we get hygienic module friendly macros and better conditional compilation on a syntactic level than dumb textual #ifdef, modules will only end up adding complexity in practice.
Also I belive that macros do not escape modules by default. That's a huge improvement.
Bjarne Stroustrup: C++ | Lex Fridman Podcast #48 https://www.youtube.com/watch?v=uTxRF5ag27A
https://developercommunity.visualstudio.com/idea/387315/add-...
I hope this also means the MSVC team had a change of mind regarding this very unfortunate blog post which IMHO did more damage to C than anything else in the last 20 years:
https://herbsutter.com/2012/05/03/reader-qa-what-about-vc-an...
It may also have contributed to a lot of software developers moving to Linux, which has always had great C compilers.
Some features listed as supported are in their experimental versions still but it’s coming along pretty well.
https://www.stroustrup.com/tour2.html
> The ``tour'' is a quick (about 240 pages) tutorial overview of all of standard C++ (language and standard library) at a moderately high level for people who already know C++ or at least are experienced programmers. It covers C++17 plus a few likely features of C++20.
I will add that it's a good way to have an overview of modern C++, you can then go deeper on some topics with more specialized resources. It's a good read IMHO, with a good pace.
If at some point you're looking for more specific resources, I would suggest to ask on the C++ subreddit. I found people there to be helpful.
On another note, Bjarne is 70 year old and he is still very active in c++ new features, very impressive. That gives me a hint that as a software engineer, I can be productive for many years to come as long as I keep studying.
I also hope Linus still maintains Linux kernel in the next 20 years.
C++xx new features and improvements are good. But they come very fast and that futureshock is causing the fever that is containerization "solutions".
I'm going to bet you haven't tried to use an older distro in the last decade and have kept up to date. Trying to run software from outside your repos that's written with the latest features is a serious problem on even mildly old distros. It wasn't such a serious problem with the slower rate of development 2000-2010. GCC 4 spanned an entire decade.
I get that on the big corporate server side there are different reasons for containers; for scaling, deployment, and all that jazz. But on the desktop, or in academia, it's the primary reason. It's futureshock and containers are the fever.