News for hackers. Stuff that matters.
Re:Cognitive loads in programming by arinlen on Thursday September 01, 2022 @02:17AM (#32672659)
> For example, if your code involves a lot of linear algebra, then operator overloading the sensible operators is probably a good thing.

Operator overloading can be totally useless in linear algebra applications as the algorithms for basic linear algebra operations (read BLAS) aggregate multiple algebraic operations (axpy, gemv,gemm).

Re:Cognitive loads in programming by magicalhippo on Thursday September 01, 2022 @04:36AM (#32673660)
True. I was thinking mostly about things like 3d renderers and such, where you do a lot of simple operations on vectors and matrices.

I've written renderers with both operator overloading and without, and the readability of the former is, to me, vastly better.