top | item 22677815

(no title)

hak8or | 6 years ago

What if you want to do an equality operation, but the greater than or less than operators require lots of computation? If an object only defines the space ship operator, then isn't it very likely that you will get a lot of extra computation when all you care baout if the two objects are or aren't equal to each other?

discuss

order

colejohnson66|6 years ago

You can choose not to define the spaceship operator and keep using the “old” ones if you want.

johannes1234321|6 years ago

Specialized Operators have higher priority. If available they will be called.