Or say that we are talking about the (im)mutability of variables, not values.
I'm not sure talking about "shallow immutability" is appropriate in this context. When you do a shallow copy, only the fields will be copied (i.e. copies of primitives, and copies of references), so this suggests that shallow immutability means the fields will also not be re-assignable.
16
u/rabidcow Mar 09 '16
It is about immutability, but shallow immutability. Since primitives are the only values types, that means just the reference for anything else.