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

jerzy.karczmarczuk at info.unicaen.fr jerzy.karczmarczuk at info.unicaen.fr
Thu May 31 19:05:31 EDT 2007


Derek Elkins after a long chain which began: 

>>> 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". 

> ... This change would -definitely- lead to massive ambiguity and 
> potentially lead to unresolvable cases.

My favourite example of a guaranteed mess is the implementation of Peano-
Church numerals as polymorphic functions in Haskell. You can multiply them,
you can act with one upon another one as well. But the multiplication is
the composition, and the functional application is the (inverted)
exponentiation! I belive that trying to produce something similar to the
proposal above would result in a True Disgrace. 

Jerzy Karczmarczuk 




More information about the Haskell-Cafe mailing list