3 ms·
Pardon my tangent, is there any languages with first class, by default units support?
by okdjnfweonfe 5y ago
Pardon my tangent, is there any languages with first class, by default units support?
- akjssdk 5y agoNot by default, but Julia has various units packages which integrate fairly well with the rest of the ecosystem. Unitful.jl [1] is the most used one I believe and integrates with DifferentialEquations.jl for example. It should also work with many other things, but you might have to patch it up a bit, especially if operations change the units (such as derivatives). [1] https://github.com/PainterQubits/Unitful.jl https://github.com/PainterQubits/Unitful.jl
- isaacimagine 5y agoYes, frink is one: https://futureboy.us/frinkdocs/ https://futureboy.us/frinkdocs/
- ThePadawan 5y agoThere is some argument for C++11 which has user-defined literals: https://en.cppreference.com/w/cpp/language/user_literal https://en.cppreference.com/w/cpp/language/user_literal
- walrus 5y agoF#
- dunefox 5y agoF# probably is best in class here: https://fsharpforfunandprofit.com/posts/units-of-measure/ https://fsharpforfunandprofit.com/posts/units-of-measure/
- LegionMammal978 5y agoThe Wolfram Language (i.e., the language used for Mathematica) supports units by default through the Quantity object [0], but the software is somewhat expensive for general-purpose use. [0] https://reference.wolfram.com/language/ref/Quantity.html https://reference.wolfram.com/language/ref/Quantity.html
- elteto 5y agoThere is Frink [0] which was created for the manipulation of physical quantities. I used it extensively in college… imperial units for fluid dynamics? yuck! [0] https://frinklang.org/ https://frinklang.org/
- deleted 5y ago[deleted]