Currently we have:
And I wonder why whe require the
const when using a raw pointer and not when using a reference.
I understand that this is similar to the way C does it but I think concistency within the language is more important that similarity to other languages.
When I first saw a
*const T I thought it was a pointer to a constant value of
T and I wondered why we would need a different pointer type for that. I think we hide the similarities to
&T a bit which makes it less intuitive.
It is weird that a raw pointer uses the same symbol as the dereference operator
* but that is caried over from C and to late to change. However using
*T in the type does not introduce any parsing problems as far as I can see as you can only use the operator in expressions while
*T is only used when giving a type.