- #1
elcaro
- 128
- 30
- TL;DR Summary
- For implementing lets say physical models it would be handy to not only know the numeric value of a variable, but also its units, have all kinds of conversions (fahrenheit to celcius, meters to feet, etc.) and addition/subtraction rules (can only add or subtract values with the same units).
In fact, the only programming language I know of that implements something like units is the programming language Frink.
In other programming languages, the implementation is left to the programmer, for example C++ can implement this as a class.
In other programming languages, the implementation is left to the programmer, for example C++ can implement this as a class.