"Alexander Schofield" <pcs3 / mailhost.njit.edu> wrote in,
....

> I'm not about to give style advice to Ron Jeffries, but
> http://sourceforge.net/projects/rubycollections might be of interest to
> you.

The Rubycollection implementation of Set(s) makes an interesting
design decision of comparing Sets based on size - this is very similar
to the current Complex#<=> implementation which is based on the
comparison of absolute values. However their Set implementation
(luckily imho) does not go the extra step of  declaring

    aset == bset  if  aset.size == bset.size

and they provide a mathematicians ``<=", ...  in the form

    aset.subclass? bset  if  aset.all? {|elem|  bset.member? elem }


More general there is always a problem with Comparable if #<=>
is not a total order.  You can actual see multiple solution to for
these problem(s) - they range form raising exception, or returning nil/0
when comparing non-comparable or not strictly equal elements.


/Christoph