roam/20210929115545-avoid_primitives.org
2021-09-29 12:21:01 -04:00

348 B

Avoid primitives

Wrapper types keep types distinct, e.g. a customer id can be represented as an int, but is not an int. This makes the domain model clearer, and they cannot be mixed up accidentally (e.g. mis-ordered parameters) as the type checker will prevent it.