On 29/11/20 11:02 pm, Paul Sokolovsky wrote:
It will be much more obvious if there's a general (standalone) "const",
I don't think it will. There's nothing about the problem that points towards constness as a solution, so it doesn't matter how many other places in the language "const" appears. And even if you're told about it, you need two or three steps of reasoning to understand *why* it solves the problem.
that's why I'm saying we can't really consider "for const" without just "const"
I agree with that.
And it's "pretty obvious" to someone who considered various choices and saw pieces falling into their places. Also might be pretty obvious for someone who used other languages.
I strongly suspect it's something that's obvious only in hindsight. -- Greg