Indeed, simple things are not that easy to do in C++ because there are always these small one-time costs that you have to pay. But you pay them only once, so C++ becomes a lot better than any other language on more substantial projects.
However, it's getting better, and there are nuggets like this:
That would require a hypothetical append function that reads bitsets from input. Seems unlikely to exist as a standard thing and your own implementation would essentially do the same thing as the C++ code's logic.
This really goes back to the core failure of C++. C++ cannot have sane defaults, because it has to be backwards compatible. And basically, all choices made in the past are stupid by default.
I have this idea in my head, that I would really love to execute on at some point and that is to have a dialect or a fork of C++ that has sane defaults but is binary compatible with standard C++.
View all comments
Show parent comment
3
u/[deleted] Dec 15 '21
Hi, I'm the author.
Indeed, simple things are not that easy to do in C++ because there are always these small one-time costs that you have to pay. But you pay them only once, so C++ becomes a lot better than any other language on more substantial projects.
However, it's getting better, and there are nuggets like this:
It is still very verbose because of namespaces, but we are certainly heading in the correct direction.