I am wondering how immutability is defined? If the values aren't exposed as public, so can't be modified, then it's enough?
Can the values be modified inside the type, not by the customer of the type?
Or can one only set them inside a constructor? If so, in the cases of double initialization (using the this
keyword on structs, etc) is still ok for immutable types?
How can I guarantee that the type is 100% immutable?