Change Reference to Value

it2022-05-09  29

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.

转载于:https://www.cnblogs.com/nanshouyong326/archive/2007/05/15/747351.html


最新回复(0)