2 ms·
Yes, you get The type 'float' does not match the type 'float<dollar>' There is an online typechecker, so one can try out F# without installing it: http://
by vilhelm_s 12y ago
Yes, you get
The type 'float' does not match the type 'float<dollar>'
There is an online typechecker, so one can try out F# without installing it: http://www.tryfsharp.org/Learn/scientific-computing#units-of-measure http://www.tryfsharp.org/Learn/scientific-computing#units-of...
- S4M 12y agoAnd how about: meal_cost * tax ? This one makes sense in the real world, so I suppose an advanced type system allows the programmer to specify what operations are legit or not across different types.
- vilhelm_s 12y agoOne could imagine systems for that, but units of measure doesn't do any customization of different operations. It's just unit checking for for arithmetic, like in high-school math.