function types syntax

Rémi Forax forax at univ-mlv.fr
Tue Jan 5 15:53:11 PST 2010


Le 06/01/2010 00:34, Neal Gafter a écrit :
> On Tue, Jan 5, 2010 at 3:28 PM, Rémi Forax<forax at univ-mlv.fr>  wrote:
>    
>> Ok, my point was "you need to change the grammar" and it seems you agree
>> about that.
>> Else the contra-example:
>> f( (Integer()) - 1);
>>      
> That isn't ambiguous for the same reason
>
> (Integer) - 1
>
> isn't ambiguous between a cast to Integer versus subtracting 1 from
> the value of a variable named Integer.  The grammar for a cast
> expression is
>
> CastExpression:
>          ( ReferenceType ) UnaryExpressionNotPlusMinus
>    

I see, so perhaps this is not ambiguous.
In this case, the only problematic point is that this syntax requires
changes to the grammar that will be hard to implement.

> Cheers,
> Neal
>    

Rémi


More information about the lambda-dev mailing list