But this is wrong. You can mutate through a shated reference, for example, atomics. That us the entire point of staying away from the mutability view. Using get
/set
terminology is actively misleading because it gives the impression that you can't mutate fields that you only have get
access to. I think that this will be a source of bugs that will only be explainable by using the exclusivity view, so we should just stay aligned to that from the start.
This is why I used the ref
keyword in my syntax proposal. I think @CAD97's proposal is also nice, but I find it a little confising. I think that I just need to look over it again in mord detail.
One thing that didn't come up, can you move out of these fields, in the case there is no Drop
impl?