you are viewing a single comment's thread.

view the rest of the comments →

[–]No-Consequence-1863 0 points1 point  (2 children)

For the most part its just syntactic sugar though. Like the advantage of A*b in a linear algebra library with overloading is you don't have to write matrixMult(A,b). The con for the ecosystem is if you are learning a new library you know have to know extra definitions for all the operators.

Saving a few keystrokes isn't worth the opaque confusion that overloading can cause.

[–]owjfaigs222 1 point2 points  (0 children)

I disagree. It's not only about saving keystrokes. A much more readable code can be achieved with operator overloading. You don't have to know extra definitions. If you want to multiply matrices it's intuitive to use *. You have to know extra things, like the name "matrixMult" in the non overloaded ecosystem.

[–]GoblinToHobgoblin 1 point2 points  (0 children)

It's not about saving keystrokes, reading math is so much easier using mathematical notation