[Pre-RFC] read-only visibility

This question seems a little unclear on what it is asking? It seems like two or three questions rolled into one.

My honest opinion is that this naming question has nothing to do with this feature. It should use the same term that all our official documentation uses for regular read-only references, whether that's shared, immutable, read-only, nowrite, lookie-no-touchie or whatever.

Did we ever have a community bikeshed on what term The Book et. al. should use for shared borrows? It seems to use "immutable" today.

1 Like

Except that this is not the same, as was explained before. A field with read-only visibility is not a shared borrow. It's a normal field that can be borrowed – either mutably or immutably, depending on in which module you are.

I... well, okay, I'm extremely confused by that response. Obviously a field is not a borrow. But what breaks the analogy between a (publicly) read-only field and a read-only borrow? I didn't seen anyone suggest that read-only fields would forbid interior mutability or anything like that.

1 Like

I am pretty sure that this is proposing which modules to disallow mutable borrows

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.