Module functions are super useful for me. Every base type like int and string gets wrapped in a more descriptive type like FirstName, PositiveInteger, USD, Milliseconds, ShortString, EmailAddress, etc. The module functions are a super convenient way to build these “newtype” with validation, equality, serialization, parsing, comparison, etc.
↧