Also "pointer to record" has existed since the dawn of time....
Whenever a record should not be passed by value, then the correct way is usually to explicitly define a pointer to the record type, and pass a pointer.
Using "const" (or "constref") is not the preferred way for this.
Then what is the point of const? I would say it's also because you don't want to pass by value and copy things you don't need to. It's easier for various reasons than using pointer semantics.
"const" can be used for this too. (And I have done so myself).
Technically "const" has one advantage (if you are aware of the rules I pointed out): "const" lets the compiler decide, if it uses a reference or not. ("constref" is always by reference)
On the other hand "const" obscures that it is (or may be) a pointer. Making it necessary to have that extra knowledge.
"const" also prevents some "mistakes", because you let the compiler know you don't want to use the pointer as a means to modify the original. But as pointed out, what you actually say is that you are not modifying the referenced value at all. Not by any means, nowhere...
So "const" is different. And "constref" is different too.
I did not make the decision to introduce "const", nor do I have first hand info why it was made.
From what I learned, it was introduced as a means to "allow the compiler certain optimizations". (so a bit like "inline").
Currently that optimization(s) is/are
- sometimes passing by ref
- sometimes omitting ref-counting
That may change / That is not guaranteed.
Sorry, that is not a full answer to "what is it for" especially with comparing to "normal pointers".