Hacker News new | ask | show | jobs
by muraiki 3368 days ago
F# supports units of measure: https://fsharpforfunandprofit.com/posts/units-of-measure/
1 comments

That looks useful. I do not know F#, but can't you still use ordinary float and have the same bug?
Sure, unit wrappers are much more like "memory safety checks" in C, in that they are incomplete and can be bypassed. In that sense, the war against raw types is necessarily a cultural one.