How to choose operator precedence?

Viewed 86

In Idris, you can define operators using infix, infixl or infixr, followed by the precedence of the operators then a list of operators, like

infixl 8 +, -

I imagine you can do this in other languages too.

I know what effect precedence has, but how do I choose what precedence to give my operators? What problems might I encounter if I initially choose a precedence that's too high or low?

1 Answers
Related