Going back to the newtype idiom, I wish Motoko had the “tuple struct” construct that Rust has, so I could omit the #kilometer in type Kilometer = { #kilometer : Float };…
Well, not being able to omit it is the whole point of the pattern, since it determines and makes explicit which unit is being used.
FWIW, a singleton record {km : Float} would work just as well.
There never were nominal types in the language, I believe we were merely hypothesising on that issue. Nominal types are rather problematic in a distributed setting, since somebody will “own” their definition locally. That is, you cannot really use them easily for messaging. So it was natural to avoid them altogether.