nifr
nifr
@nifr.bsky.social
Pleased to meet you.
It declares a type that is different but the same. Unequal "nominally", but equal "structurally". Different types, same representation.

For example, Age and UniqueIDs are both integers, but newtypes let you recruit the type system to prevent you from accidentally conflating them.

HTH.
July 31, 2023 at 2:23 AM