Syntax...

Rémi Forax forax at univ-mlv.fr
Fri Nov 20 15:05:02 PST 2009


Le 20/11/2009 20:44, Neal Gafter a écrit :
> Folks-
>
> The 0.6a syntax is based on CLang 
> <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2008-August/002670.html>, 
> but with # instead of ^.  I kind of like ^ better, but that's slightly 
> inconsistent with method references, which must use # because (a) 
> that's the javadoc syntax, and (b) it would be ambiguous to use ^.

I vote for any syntax that clearly differentiate between lambda and 
function type.

Rémi

>
> How would you feel about using ^ instead of # for function types and 
> lambdas:
>
> /Expression:/
>     /ExpressionLambda/
> /Primary:/
>     /StatementLambda/
> /ExpressionLambda/:
>     *^* ( /FormalParameters_opt / ) /Expression/
> /StatementLambda/:
>     *^* ( /FormalParameters_opt / ) /BlockStatement/
>
> /Type:/
>     /FunctionType/
> /FunctionType/:
>     *^ */Type/ ( /TypeList_opt /* )* /FunctionThrows_opt /
> /TypeList:/
>     /Type
>     Type/ , /TypeList/
> /FunctionThrows/:
>     throws /FunctionExceptionTypeList/ 
> /FunctionExceptionTypeList:/
>     /ExceptionType
>     FunctionExceptionTypeList | ExceptionType /
>
> /Primary:/
>     /MethodReference/
> /MethodReference:/
>     /Primary /# /TypeArguments_opt Identifier/ ( /TypeList_opt / )
>
> Cheers,
> Neal
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/closures-dev/attachments/20091121/6949be66/attachment.html 


More information about the closures-dev mailing list