Ask HN: Is there any programming language with a Physics-like dimensional types?
3 comments
I think this is normally done in terms of 'units of measure'. Here's how F# implements this: https://docs.microsoft.com/en-us/dotnet/fsharp/language-refe...
https://fsharpforfunandprofit.com/posts/units-of-measure/
Mathematica seems to have support for units: https://reference.wolfram.com/language/tutorial/SymbolicCalc...
frink
or this python library : https://github.com/katerina7479/python-units-of-measure
or this python library : https://github.com/katerina7479/python-units-of-measure
For example, I could say:
Is there any programming language type system that supports this idea?