Nov. 4, 2013
12:35 p.m.
do you have a real use case? Stef On Nov 4, 2013, at 1:32 PM, Yuriy Tymchuk <yuriy.tymchuk@me.com> wrote:
Hi everyone.
Iâm wandering if there was any sort of a discussion about a spaceship method used in Ruby.
The concept is that you should implement a method <=> that returns something negative if the receiver is smaller then a parameter, positive when the receiver is greater then a parameter, and 0 if they are equal.
This way if you are implementing comparable objectâs the only method you have to redefine is spaceship (<=>).
Yes, I know that i Pharo you have to only redefine < and =. But maybe it would be interesting to use spaceship :)
What do you think? Cheers! Uko