Hi all,
I just found out that the following throws a DNU:
1 compareSafely: 1 i.
It is mathematically correct that Complex does not implement #<. However, why does Complex override #isNumber to return true? Where is this used?
Should we maybe check in Number>>#compareSafely: whether aNumber respondsTo: #<? Or introduce something like #isMagnitude?
Number>>compareSafely: aNumber
^ (aNumber isNumber and: [aNumber isMagnitude])
ifTrue: [ self < aNumber ]
ifFalse: [ super compareSafely: aNumber ]
Best,
Christoph
Carpe Squeak!