Hacker News new | ask | show | jobs
by phillipcarter 3407 days ago
There's an article here: https://docs.microsoft.com/en-us/dotnet/articles/fsharp/lang...
1 comments

That actually looks really indispensable when you're working with units! I wonder if functional langs without this feature might be able to implement it via macros somehow which only run at build time...
Scala has a library for units of measure: http://www.squants.com/

I think you can do it in most reasonable statically-typed languages, with a little care. Scala makes automatic conversions a bit easier because it lets users specify them. Like C# actually. You could probably do UoM in C# too.