Dear Bill, Waldek, *

Waldek Hebisch <[EMAIL PROTECTED]> writes:

> I would say that sorting elements of Set is a design bug.

I disagree - but in fact, I believe that the statement above is due to
miscommunication:

"Set" uses the order of the underlying domain *if* the latter is an OrderedSet,
i.e., if it is totally ordered.  In my opinion, this is a very reasonable
decision.

If the underlying domain is not an OrderedSet, for example "ANY", then "Set"
will use slower algorithms, which do not depend on an ordering.

I think that this is very much in line with the philosophy of axiom. Note that
most domains have OrderedSet.

I think it is a mistake to pretend that a domain is ordered, using tricks like
hashing, within "Set".  If you really need fast set-operations for such a
domain, make it an OrderedSet.  However, I do not believe that making ANY an
OrderedSet is wise.  If your elements happen to be of type ANY and you need
fast Set operations for them, I'd suggest that you look for a better domain.

Martin



_______________________________________________
Axiom-developer mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/axiom-developer

Reply via email to