Re:Const vs. constexpr vs. consteval vs. constinit in C++20
by tialaramex on Tuesday November 29, 2022 @06:52AM
(#33786402)
Notice that what you're asking for is to abolish const local variables. Which also isn't what Herb offers, this was the status quo in C during the K&R era because "const" didn't exist in K&R C. If you actually want const local variables, just not by default, you're not actually agreeing with Niko.
Re:Const vs. constexpr vs. consteval vs. constinit in C++20
by ameliaquining on Wednesday November 30, 2022 @07:31PM
(#33810432)
Yes, this is correct.
(The exception is closures; prohibiting a variable from being reassigned after it's been closed over is useful because anyone reading the code may expect one of two conflicting behaviors depending on context, and so it's good to instead write the code in a way that doesn't have that ambiguity. Java got this one right.)
A post articulating this point, by the person primarily responsible for Rust's shared-xor-mutable architecture (so presumably he has some idea what he's talking about, though note that his argument did not carry the day): https://smallcultfollowing.com/babysteps/blog/2014/05/13/foc...