This is a (slightly belated) follow up to Does Baggy add (+) work on MixHash weights? . MixHash is a great tool for Unit comparisons - since I know that my dmix => ("m"=>2,"kg"=>1,"s"=>-2).MixHash is the same for 'kg m2 per s2' and 'kg.m^2/s^2', and so on.
Here is the threefold clarity I seek:
- I still need to coerce the result of MixHash (+) MixHash to MixHash (the default result is an immutable Mix) - is it still the intent for the result of ops on one or more MixHashen to be a MixHash?
- The result if MixHash (+) Any sneaks in a naughty unwanted element dmix => ("m"=>2,"kg"=>1,"s"=>-2,"MixHash"=>1) - this is a bug, right. [I have patched by setting the deflation default to empty set... MixHash $.dmix is rw = ∅.MixHash;]
- The docs https://docs.raku.org/language/setbagmix show (+) as Baggy addition, but (-) as Set Difference. When I do MixHash (-) MixHash I seem to get Baggy subtraction - which is what I want. Hopefully this is an oversight in the docs??
Let me know if I can provide code or should submit a bug report...