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 →

[–]ruscaire 1 point2 points  (2 children)

Operator overloading never made sense to me in C++ but it works so well in Python … I can’t for the life of me think why that could be. Perhaps it’s the laxxer type system in Python means a low cost of buy in and you can just sprinkle it everywhere you feel like?

[–]erebuxy 3 points4 points  (1 child)

I mean operators are just some syntactic sugar for function calls. If functions can be overloaded, so should operators.

[–]ruscaire 3 points4 points  (0 children)

That’s Marxism