Hacker News new | ask | show | jobs
by thinkpad20 4421 days ago
With haskell's type system most precedence errors are caught quickly. Precedence generally follows intuition: PEMDAS of course, and then the idea that control-flow operators like >>=, <|>, etc should be lower precedence, while operators that tend to group expressions together like (.) should be high-precedence. Of course a lot of the time it's somewhat arbitrary, but this is because a lot of the time it just doesn't matter. In cases where things aren't clear, you can always choose to use parentheses.