Many languages map operators onto integers and then do ordering that way. An alternate strategy might be to use scala’s approach or lexicographic sorting, but allow a def to declare a list of operators it binds binds above or below, anything not in that list falls back to lexicographic.
Something like:
class Foo {
@precedence(List(IsLowerThan(Foo.+)))
def *(that: Foo) = ...
def +(that: Foo) = ...
it would be an error if those declaration don’t form a lattice (i.e. there is a cycle).