I misread this title (the word "confidence" threw me) and was initially very confused when it turned out to be about dimensional analysis instead of uncertainty.
But why not both? A number system with dimensions and which automatically propagates measurement uncertainty through calculations (a la Taylor's train wreck book) doesn't seem totally infeasible?
I would particularly like this for expressing cad models as code instead of brep.
There are Haskell packages for uncertainty (e.g. [0], based on automatic differentiation [1]). However, these packages don't support typed dimensions, because multiplication/division becomes more complex.
It is my goal to provide quantities with uncertainty AND typed dimensions one day.
Very cool. Thanks for the links, I'm not very familiar with the Haskell ecosystem, I mostly work in Rust and Go these days. I'll definitely check them out.
This is the kind of thing that would be pretty straight-forward in Julia, I imagine. Independent libraries for uncertainties and units could easily be remixed together if the unitful quantity accepts any number type, and the uncertainties just define a new number type. Multiple dispatch should generate consistent downstream behavior "for free".
julia> using Unitful: m, s
julia> using Measurements
julia> Δx = (3.0 ± 0.1)m
3.0 ± 0.1 m
julia> t = (1.0 ± 0.2)s
1.0 ± 0.2 s
julia> v = Δx / t
3.0 ± 0.61 m s^-1
But why not both? A number system with dimensions and which automatically propagates measurement uncertainty through calculations (a la Taylor's train wreck book) doesn't seem totally infeasible?
I would particularly like this for expressing cad models as code instead of brep.