8 ms·
Keep in mind that in Haskell all operators can be defined in user-level code. They can also be shadowed by your own code. If you don't like `<>`, you can also
by eru 4y ago
Keep in mind that in Haskell all operators can be defined in user-level code.
They can also be shadowed by your own code.
If you don't like `<>`, you can also easily make your own function and use that instead:
my_function a b = a <*> b
I agree that (infix) operator syntax can make some code hard to read, but it can also make some code easier to read. I do feel strongly that allowing people to make up new operators is preferable to undisciplined overloading of existing operators:
Eg in Haskell when you see `<>` at least you know that something unusual might be going on. In C++, when you see `>>` (or even `+`) you have no clue whether it's just plain old bit-shifting, or whether someone overloaded it to do IO or perhaps launch the missiles.