On Mon, 30 Nov 2020 12:56:59 +1300 Greg Ewing email@example.com wrote:
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.
As was mentioned, there's no replacement for reading docs/tutorials.
And all that applies the same to "for new".
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.
The same for "for new". But at least "for const" fits better with other usages of "const", including in other languages (so much less of NIH syndrome).