On Oct 02, 2006, at 14:49 UTC, [EMAIL PROTECTED] wrote:

> I would still like to see RS add a built in Comparble interface that
classes can
> impliment for object array sorting. That is a much more flexable and
cleaner
> general solution IMO.

Well, it certainly is for some problems, though not for all.  If you
really want flexible and clean, you use a comparator object (as I
believe Charles's library can do).  That way, you can change the way a
bunch of objects are sorted just by changing the comparator; you don't
have to touch the objects themselves.

I'd love to see something like a standard Comparable interface too, but
there are seriously ugly devils in the details of that.  (Just think:
what exactly would be the parameter types of the Operator_Compare
function it defines?)

But meanwhile, SortWith is pretty handy and, apparently,
underappreciated.  :)

Cheers,
- Joe

--
Joe Strout -- [EMAIL PROTECTED]
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.com/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to