
18 Oct
2009
18 Oct
'09
5:04 p.m.
2009/10/18 Will Ness
Deniz Dogan
writes: `This` syntax is used to make functions work infix, whereas operators already are infix. For this reason, it wouldn't make much sense to use `this` syntax (what's that called anyways?) on an operator.
It would be a no-op in general, so nobody would use it.
`(-)` would in some sense be the same thing as just "-", since () is used to make operators prefix and `` is used to make functions infix.
exactly, just that it would be a _binary_ (-) .
So the only case where `(this)` syntax would be useful is where you want to make GHC understand you mean the binary (-) operator and you want to use point-free code. Now you have the choice between `(-)` and subtract, which one will it be? :) -- Deniz Dogan