You can even take this a step further: using `float` instead of `kilogram` is leaking an implementation detail. It's (probably) too low-level of information to actually be useful.
Luckily, more and more programming languages are making creating these simple types easier. Haskell:
newtype Kilogram = Integer
Rust: struct Kilogram(int);
In fact, this blog post, while a bit outdated, shows an application of this idea, to solve string encoding issues for HTML templating: http://bluishcoder.co.nz/2013/08/15/phantom_types_in_rust.ht...