[Haskell-cafe] Numeric vs. relative precedences of infix operators

Henning Thielemann lemming at henning-thielemann.de
Mon Feb 28 09:44:31 EST 2005


Is it widely accepted that the precedence of infix operators is defined by
numbers? The numbers look arbitrary to me and it is not possible to
introduce infix operators with interim precedences.
 What about defining relations such as "(*) has precedence over (+)"? The
compiler could construct a topographically ordered graph from these
relations. This way it would also be possible that from two infix
operators none has precedence over the other (although the have not the
_same_ precedence), thus the sub-expressions with these operators must be
enclosed in parentheses.



More information about the Haskell-Cafe mailing list