Remix.run Logo
thaumasiotes a day ago

> I love operator overloading, I love how Python does it (once you satisfy an interface, its operators Just Work).

Is this different from other styles of operator overloading? Why does it matter whether, when I want to overload the + sign, I need to define a function called `__add__` or `operator+`?

WesolyKubeczek a day ago | parent [-]

For me it's easier to introspect, fewer unexpected corners. Contrast this with operator overloads which you can put literally anywhere.