Why not use juxtaposition to indicate function application

Kiuhnm kiuhnm03.4t.yahoo.it
Fri Mar 16 18:18:21 CET 2012

On 3/16/2012 17:45, Steven D'Aprano wrote:
> On Fri, 16 Mar 2012 17:31:06 +0100, Kiuhnm wrote:
>> You wouldn't, because Haskel's way is more regular and makes a lot of
>> sense: parentheses are for grouping and that's it.
> If f is a function which normally takes (for the sake of the argument)
> one argument, then f would call the function with no arguments (which may
> return a curried function, or may apply default arguments, or perhaps
> raise an exception). So how would you refer to the function itself
> without calling it?

Thanks to Referential Transparency, a function with no params is a constant.
But that's a good observation. It would cause some problems in Python. 
ML languages use the empty tuple: f().


More information about the Python-list mailing list