Specialized Values

This advice comes from my four years of writing financial software in smalltalk. I had already found the distinction between object and value useful, even when working where everything is an object.

Summary

First consider quantities used by the domain model. Your domain code must express the "logic" of the business in its richest and often illogical detail. Every clause of every statement should be motivated by some business fact of life. Other concerns will be pushed into the specialized values of this section or pulled out into objects described later.

See more sections regarding Information Integrity

Patterns

Whole Value as in date, money, or coordinate.

Exceptional Value as in various, unknown or failed.

Meaningless Behavior that could not be anticipated.

Related

State of the Values. John Rose, Brian Goetz, and Guy Steele. 2014. This is a sketch of proposed enhancements to the Java Virtual Machine instruction set, and secondarily to the Java Language, to support small immutable, identityless value types. webpage

Values and Objects in Programming Languages. Bruce MacLennan. 1981. The terms value-oriented and object-oriented are used to describe both programming languages and programming styles. This paper will describe the differences between values and objects and to show that their proper discrimination can be a valuable aid to conquering program complexity. archive