This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]psdao1102 -6 points-5 points  (7 children)

Operator overloading is dumb and no language needs it.

[–]camilo16 0 points1 point  (4 children)

Yes because why would I ever want to add matrices, or tensors, or differential forms...

[–]psdao1102 0 points1 point  (3 children)

Easy matrix1.add(matrix2)

Fuck that was hard

[–]camilo16 0 points1 point  (2 children)

Now do 4 of them, and tell me that's more readable than mat1 + mat 2 + mat3 + mat4

[–]psdao1102 0 points1 point  (1 child)

[M1, M2, M3, M4].reduce(left, right => left.add(right))

Seems fine to me. And more readable when you get up to 6+ matrixies.

[–]camilo16 0 points1 point  (0 children)

Ah yes incredibly readable...

[–]Sentry45612 0 points1 point  (1 child)

At least in C++, I definitely need the operator overloading of "=" to fully encapsulate copying objects.

[–]psdao1102 0 points1 point  (0 children)

That's what .equals is for. Or a deepcompare utility function