4 ms·
Value objects are equal if they have the same values (although are still different objects) - there's a little more to it than simply immutable data structures.
by eddsh1994 4y ago
Value objects are equal if they have the same values (although are still different objects) - there's a little more to it than simply immutable data structures.
- colonwqbang 4y agoWell, what is it then? Is it something more than * An immutable composite value that * Has an equality operation not based on pointer identity Those have been known for a long time, at least 30 years. It is the default type of value of Haskell, a language that is older than Ruby.
- eddsh1994 4y agoYes, they can still be separate objects too https://wiki.haskell.org/Physical_equality https://wiki.haskell.org/Physical_equality
- capableweb 4y ago> Well, what is it then? Is it something more than Straight from the horse's mouth: https://martinfowler.com/bliki/ValueObject.html https://martinfowler.com/bliki/ValueObject.html
- _dain_ 4y agoyeah and martin fowler did not invent that.
- eddsh1994 4y agoWithin the domain of enterprise software, or maybe just 'applied CS', I think he did. What's an earlier reference than his 2003 use of it?
- _dain_ 4y agopretty sure lisp had it for decades
- cratermoon 4y agoWard Cunningham's CHECKS Pattern Language of Information Integrity, published in 1994, where it's called Whole Value