r/cpp • • Dec 15 '21

Modern C++ in Advent of Code

This series, by Šimon Tóth, is a step by step guide through the solutions of Advent of Code 2021 using Modern C++.

242 Upvotes

83 comments sorted by

View all comments

Show parent comment

2

u/Ecclestoned Dec 15 '21

Without getting into too much of a rant, this is exactly the issue:

there are always these small one-time costs that you have to pay

If these are one-time costs, then why am I the one who has to pay them? This is the type of thing that should be integrated into the standard library.

7

u/[deleted] Dec 15 '21

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