[Haskell-cafe] mathematical notation and functional programming
Jorge Adriano Aires
jadrian at mat.uc.pt
Fri Jan 28 18:11:50 EST 2005
> Things I'm unhappy about are for instance
>
> f(x) \in L(\R)
> where f \in L(\R) is meant
>
> F(x) = \int f(x) \dif x
> where x shouldn't be visible outside the integral
>
> O(n)
> which should be O(\n -> n) (a remark by Simon Thompson in
> The Craft of Functional Programming)
> f(.)
> which means \x -> f x or just f
All of these are the same notation abuse,
"sometimes f x is meant to be interpreted as \x->f x"
In some cases it would be really tedious to add the extra lambdas, so the
expression used in its definition is used to denote the function itself.
> a < b < c
> which is a short-cut of a < b \land b < c
Both, ambiguity and complex notation, can lead to (human) parsing problems,
which is what we are trying to minimise here.
J.A.
More information about the Haskell-Cafe
mailing list