3 ms·
Sadly, Sutter disagrees philosophically with making locals const by default, and I think doing so is table stakes: https://github.com/hsutter/cppfront/wiki/Desi
by quotemstr 1y ago
Sadly, Sutter disagrees philosophically with making locals const by default, and I think doing so is table stakes: https://github.com/hsutter/cppfront/wiki/Design-note%3A-const-objects-by-default https://github.com/hsutter/cppfront/wiki/Design-note%3A-cons...
I mean, c'mon
> Show that in today's C++ guidance literature we already teach C++ programmers to make local variables const, and link to a few examples of such guidance (which will contain more details, including examples of problems that the advice avoids). That will start to make the case. If you can do that, feel free to open a "suggestion" issue about it!
That "C++ guidance literature" is called the Rust book. Const by default won.