Re:Why Go Is Not Good (2014)
by howeman on Wednesday December 09, 2015 @11:50AM
(#10704824)
Of course, you frequently don't want operator overloading for matrix multiplication. Avoiding allocations is a big deal for speed, and so c.Mul(a,b) is often the right answer even with operator overloading.
[ Parent
| on HN ]
I'm not aware of a language that allows operator overloading for matrix operations, but denies you access to c.Mul(a,b) or the equivalent when you need it. I find operator overloading pretty crucial for prototyping this sort of algorithm even if I'm later going to refactor it for performance.
edit: rereading the earlier comments, this may be orthogonal to the GP's claim that operator overloading is crucial for generics. Ooops. :)
How does allocation relate to operator overloading?
It gives you more explicit control over the storage being used for expression evaluation.