All in all, generic equality and comparison is something that Perl 5
did really poorly. Some people overloaded eq, some overloaded ==,
some wrote a ->equal method, and there was no way to shift between the
different paradigms smoothly. This is one of the times where we have
to choose for them.
My ideas run more along a role that defines an ordering on a type.
Such a role might require slot/infrastructure methods
and compose other ops from these with "namespace assignment":
::.<= ::= any( .==, .< )
::Str ::= Item where .value.does(Order[eq, lt])
::Num ::= Item where .value.does(Order[==, <])
Actual syntax might be more convoluted :)
The point is that the 'generic' comparator is a method junction.
More like: "Ahm, what did the operants say their comparator was?"
BTW, where can I read about PIL, other then in Parrot/Pugs svn?
$TSa.greeting := "HaloO"; # mind the echo!