Ask HN: Where are the unit-typed languages?
1 points| univacky | 6 years ago
Instead of an integer being a standalone noun, "5", it would be "5 apples", or "5 meters/second". Multiplying a variable of 3 meters/second by a variable of 2 minutes could give a result of 180 meters, and adding nautical miles to dollars would give an exception. I've played around with this idea a little bit in objects, but it seems like a language with such features built in or an object library should already exist somewhere.
kognate|6 years ago
It's a pretty niche topic. You can do this in a language like c++ or even python but unit aware calculations aren't a requirement for a lot of systems.
blandflakes|6 years ago