[Haskell-cafe] Parse text difficulty

Henning Thielemann iakd0 at clusterf.urz.uni-halle.de
Thu Dec 9 10:37:11 EST 2004

On Thu, 9 Dec 2004, Robert Dockins wrote:

>  > And I thought that most programmers used "zipWith", which has to be
>  > prefix.
> Is this true?  Can you not use backticks on a partially applied 
> function?  If so, it seems like such a thing would be pretty useful 
> (although I've never actually had occasion to need it, so....)  I'll dig 
> out the report and check sometime, but does anyone know for sure that 
> the following wouldn't work?
> [1..5] `zipWith (+)` [7..]

Infix operators are syntactic sugar, they are neither necessary nor
essential. They can be used to simulate mathematical notation, if one
considers that to be more readable, not only because it is more common.  I
don't think that it is a good idea to extend the infix notation to any
functional expression. I also think that one should use backquotes rarely
and especially one should not define library functions with their
parameters in the "wrong" order just because one expects that the user of
the library will stick to the infix notation and slicing (such as (`zip` x)).
 I hope that it is not true, that most programmers write `zip`. If it is
true, I doubt, that this is good style.  :-]

More information about the Haskell-Cafe mailing list