function types syntax

Rémi Forax forax at univ-mlv.fr
Tue Jan 5 17:13:58 PST 2010


Le 06/01/2010 02:07, Neal Gafter a écrit :
> On Tue, Jan 5, 2010 at 4:50 PM, Rémi Forax<forax at univ-mlv.fr>  wrote:
>    
>>> Having said that, I believe a function type syntax using only parens
>>> is hard to read, especially when combined with the shorthand
>>> invocation syntax.  What does this mean:
>>>
>>> (x(y))(z)
>>>
>>> Perhaps it is casting the value of z to the function type x(y), or
>>> perhaps it is invoking the method x on the argument y resulting in a
>>> value of function type to be applied to the argument z.  We could come
>>> up with rules to disambiguate them, but programmers will still get
>>> confused.  That's why we abandoned the syntax after BGGA version 0.1
>>> http://www.javac.info/closures-v01.html .
>>>
>>>        
>> It can also conflict with () if parenthesis are used to invoke a lambda.
>>      
> I just said that.
>    

Ok, it's too late for me :)
good night.

Rémi


More information about the lambda-dev mailing list