cmuratori
They didn't understand that there are two concepts at play, one of which is always important and the other which is sometimes important, and they chose to support the "sometimes" one :(
To be fair to the designers, "const" is fundamentally about compiler-checked documentation, which is meant to make your programs more correct, not more efficient. That's the theory, and it's not a bad theory for 1983.
To paraphrase the code monk, it was never intended to help the compiler. It was intended to help you
if you follow the convention, but a convention is just a convention. All of that "adding const in lots of places" or "dropping const from lots of places" that was mentioned earlier as a royal pain in the whatever (and it is!) is the compiler's way of forcing you to follow the convention.
It would be very, very nice to have read-only values, but I don't think that anyone at the time realised how useful that was. C++ wasn't even designed with threads in mind.
sol_hsa
Well, as long as you can do memset directly on the data segment, nothing in it is truly constant.. =)
That's not really an issue, because this is neither a performance measure nor a security measure.
cmuratori
So, big surprise, the C++ designers focused on the one that's strictly about the programmers making themselves happy about some abstract concept, and totally missed the one that would actually have produced better code :(
If the choice is between more correct code and faster code, the early C++ designers erred in the direction of the former rather than the latter.
Today, we rightly see it as a false dichotomy, but in 1983, with the "software crisis" still recent memory, that wasn't as clear as it is now.
TL;DR: I blame C++, but I don't blame the early C++ designers.