On Tue, Dec 21, 2021, 6:37 AM Andreas Hennings <andr...@dqxtech.net> wrote:
> > In a class Matrix, you might want to implement three variations of the > * operator: > - Matrix * Matrix = Matrix. > - Matrix * float = Matrix. > - Matrix * Vector = Vector. > Same for other classes and operators: > - Money / float = Money > - Money / Money = float > - Distance * Distance = Area > - Distance * float = Distance > these are bad examples and nightmare to maintain. I think even more with lovely typed languages. Matrix*float are better implemented as method here. >