On 21 May 2015 at 16:22, Max Leske <maxleske@gmail.com> wrote:
About the spaceship operator (<=>), is this something�� we'd like to have around? (I like it). http://en.wikipedia.org/wiki/Three-way_comparison
How would you make this ���object oriented���? Have three singleton objects ���Less���, ���Greater���, ���Equal��� (similar to ���True���, "False���), and on those object methods ���ifLess:���, ���ifEqual:���, ���ifGreater:���?

In http://mc.lukas-renggli.ch/container/ Lukas defined a hierarchy of comparator classes which answer messages like
equals: X to: Y
less: X than: Y
maximum: anIterable

etc.


--
Damien Pollet
type less, do more [ | ] http://people.untyped.org/damien.pollet