Change Reference to Value

 

You have a reference object that is small, immutable, and awkward to manage.

Turn it into a value object.

To convert this to a value object, the key thing to do is verify that the object is immutable. If it isn’t, I don’t try to make this change, as a mutable value causes no end of painful aliasing.

你可能感兴趣的:(reference)