HaloO Larry,

you wrote:
You guys should read The Search for the Perfect Language, by Umberto Eco.
It would disabuse you of the notion that perfect orthogonality is possible
or even desirable.

I'm sorry if my contributions to this thread are annoying. But one
question remains that might actually make Duncan's proposal
pointless. Are the comparison operators available for overloading
just like any other operator or is the casting of the operands
performed *before* dispatch sees the actual types? If overloading
is possible than the numeric and string comparison should be
adhered to "in spirit".

I can imagine to have a role Order that composes the comparison ops.
E.g. Order[Num] composes <, >, >=, <= and <=>. Order[Str] composes
lt, gt, ge, le and leg. You get both when composing Order[Num|Str].
The generic Order[Foo] would compose before, after, their negations
and cmp. Order would imply Comparable, that is the equality checks
===, eqv, == and eq. Comparable would take the same type parameters
as Order and compose different sets of ops accordingly.

The binding check =:= is hardly useful for overloading because it
operates on the namespace level.

Regards, TSa.
--

Reply via email to