3 ms·
Operator overloading can certainly do good things. Not going to argue with you there. Though, in the case of units, you can actually go a long way with that (ht
by howeman 13y ago
Operator overloading can certainly do good things. Not going to argue with you there. Though, in the case of units, you can actually go a long way with that (http://play.golang.org/p/iCqB2euJj8 http://play.golang.org/p/iCqB2euJj8). It's not perfect, you have to do some function calls to multiply units of differing type correctly, but you do gain all the proper compile-time safety, and you don't need to do all sorts of method calls.
What are you doing with uncertainty that you can do operator overloading with? You usually want to do Bayes rule with probabilities, but that gets intractable fast.