patterns:value_object
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
patterns:value_object [2020-10-12 16:52] – old revision restored (2015-06-24 23:18) 159.69.186.191 | patterns:value_object [2021-09-02 12:15] – old revision restored (2021-05-11 22:47) 65.21.179.175 | ||
---|---|---|---|
Line 15: | Line 15: | ||
===== Problem ===== | ===== Problem ===== | ||
+ | j | ||
In many object-oriented languages objects have referential semantics. A variable holding an object does not hold the object itself but rather a pointer, a reference, to it. Assignment copies the reference instead of the object. This behavior is desirable in many cases. You don't want to copy your controller classes when you have several variables for it. | In many object-oriented languages objects have referential semantics. A variable holding an object does not hold the object itself but rather a pointer, a reference, to it. Assignment copies the reference instead of the object. This behavior is desirable in many cases. You don't want to copy your controller classes when you have several variables for it. | ||
patterns/value_object.txt · Last modified: 2021-10-18 22:25 by christian