[Haskell-cafe] Crazy idea: overloading function application notation

Henning Thielemann lemming at henning-thielemann.de
Thu May 31 10:46:42 EDT 2007


On Thu, 31 May 2007, Jon Harrop wrote:

> This is a crazy idea I've been working on: overload the syntax "x y" so it can
> mean function application "f x = f(x)" or multiplication "x y = x*y". The
> reason is simply that I appreciate the brevity of MLs function application
> but I also appreciate the brevity of Mathematica's multiplication.
>
> Is it possible to implement this in Haskell using type classes?

Is this "wantable"?

> Is there any way this could actually be practicable?

On
 http://www.haskell.org/haskellwiki/Num_instance_for_functions
   I have described, what happens if you want too many meanings for the
same syntax.


More information about the Haskell-Cafe mailing list