4 ms·
So from your example I understand that F# doesn't know how to do more complex unit conversion? Does it know N=kg m/s^2 for example? That's related to the issue
by cycomanic 5y ago
So from your example I understand that F# doesn't know how to do more complex unit conversion? Does it know N=kg m/s^2 for example? That's related to the issue I often encountered with unit types. They work great for simple use cases, and give you a sense of security, but then fail and you end up writing lots of code just to make the unit types happy (you might argue that it makes the code safer, but it can be a lot of time spend). One cthing that falls over in pretty much all implementations I've encountered is log units (dBm, dBW,...)
- int_19h 5y ago> Does it know N=kg m/s^2 for example? F# does if you tell it, i.e.: [<Measure>] type kg = g [<Measure>] type m [<Measure>] type s [<Measure>] type N = kg * m / s^2 Although, of course, in practice you'd probably just use whatever's defined in https://fsharp.github.io/fsharp-core-docs/reference/fsharp-data-unitsystems-si-unitsymbols.html https://fsharp.github.io/fsharp-core-docs/reference/fsharp-d... Not for log units tho.
- deleted 5y ago[deleted]