Historically we require that lvalue is writable before allowing taking a pointer.
That does not make a lot of sense. While there are ways to "cast away" readonliness, why is that even required before "casting away" most of the type system safeguards?
I think it is just an artifact of old implementation strategy that internally combined "lvalue" and "writeable".
Now that these concepts are properly separated, it makes sense to require that the target of "&" is an lvalue, but does not need to be writeable.
Historically we require that lvalue is writable before allowing taking a pointer.
That does not make a lot of sense. While there are ways to "cast away" readonliness, why is that even required before "casting away" most of the type system safeguards?
I think it is just an artifact of old implementation strategy that internally combined "lvalue" and "writeable".
Now that these concepts are properly separated, it makes sense to require that the target of "&" is an lvalue, but does not need to be writeable.