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.
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.