Not listed, for C++, which I rather like the look of, is “units”. It’s header only, compile time (everything resolves to doubles during compilation) and released under MIT.
Sample code looks like:
foot_t len = 5_m; // simple implicit conversion
meters_per_second_t speed = 60_mi / 1_hr; // more complex implicit conversion
square_meter_t area = 15_m * 5_m + 1000_cm * 1000_cm; // previous example with mixed units
And F#’s measures feature makes me want to try out F# (but not enough to actually do it).
Probably the most intriguing to me personally is Frink, which I didn’t know about. Although it’s a bit of an outlier on this list it seems. Most of the entries add units to general-purpose programming language in order to improve robustness and reduce likelihood of unit-related errors (analogous to an extra layer of typing, maybe?). While Frink is, as the author notes, “more of a tool for physics calculations than a general purpose programming language”. In that category the tool I’ve found most usable in the past is Mathematica.
It’s a nice list and well researched.
Not listed, for C++, which I rather like the look of, is “units”. It’s header only, compile time (everything resolves to doubles during compilation) and released under MIT.
Sample code looks like:
And F#’s measures feature makes me want to try out F# (but not enough to actually do it).
Now that’s a very useful list.
Probably the most intriguing to me personally is Frink, which I didn’t know about. Although it’s a bit of an outlier on this list it seems. Most of the entries add units to general-purpose programming language in order to improve robustness and reduce likelihood of unit-related errors (analogous to an extra layer of typing, maybe?). While Frink is, as the author notes, “more of a tool for physics calculations than a general purpose programming language”. In that category the tool I’ve found most usable in the past is Mathematica.
Ayyyy, something to crib off of when I go poke at Schlub again.