This document discusses proposals for implementing value objects in JavaScript. Some key points include:
- Value objects could represent common types like integers, floats, and SIMD vectors, as well as mathematical constructs like big numbers, decimals, and complexes.
- Overloadable operators like +, -, *, / would allow defining behaviors for mathematical operations on different value object types.
- To preserve boolean identities, != and ! cannot be overloaded, and relations like > would be derived from <=.
- Strict equality operators === and !== cannot be overloaded and test structural equality.
- An approach using cacheable multimethods avoids issues with double dispatch and allows defining operators between types.
- Literal