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:
Let me know if I can provide code or should submit a bug report...
Yes, if either side of a set operator is a mutable version, then the result should also be a mutable version. If it is not, it is a bug.
Any
is a value, albeit an undefined one. So effectively, the right hand side is acting as if it is a Any.MixHash
(which is (Any=>1).MixHash
). So this is not a bug. Also, alternately, you could say has %.dmix is MixHash
This is indeed a problem in the docs. Not really an oversight, but actually a failure to update, because in an older implementation of the set operators, that was the behaviour.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With