Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've always found the profusion of infix operators in Haskell to be heinously confusing, and seriously degrades readability and usability of libraries.limits on the o


The problems I see with infix operators are:

- It's not necessarily obvious what is an infix operator

- Precedence and associativity

I think Haskell has solved the first one: with all non-alphanumeric symbols in expressions being infix operators, and likewise for alphanumeric functions written with backticks.

But precedence and associativity is not obvious, since that is something that you can customize. I think that user-defined infix operators with some severe limits on choosing precedence and associativity is a good compromise (many use backticks on functions in Haskell, and that has a default precedence).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: