Syntax...
tronicek at fit.cvut.cz
tronicek at fit.cvut.cz
Sat Nov 21 04:23:06 PST 2009
Hi,
I do not have any strong argument neither for # nor for ^ but I,
personally, prefer # (for both, function types and lambdas). Why?
^ is an operator and thus # seems to be more readable.
In C, the situation is different: # is a preprocessor thing and so ^ is
probably better there.
Zdenek
--
Zdenek Tronicek
FIT CTU in Prague
Neal Gafter napsal(a):
> 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 ^.
>
> How would you feel about using ^ instead of # for function types and
> lambdas:
> *Expression:**ExpressionLambda**Primary:**StatementLambda*
> *ExpressionLambda
> *:*^* ( *FormalParametersopt* ) *Expression**StatementLambda*: *^* ( *
> FormalParametersopt* ) *BlockStatement*
> *Type:**FunctionType**FunctionType*:
> *^ **Type* ( *TypeListopt** )* *FunctionThrowsopt* *TypeList:**Type
> Type* , *TypeList**FunctionThrows*:throws *FunctionExceptionTypeList* *
> FunctionExceptionTypeList:* *ExceptionType
> FunctionExceptionTypeList | ExceptionType * *Primary:**MethodReference**
> MethodReference:**Primary *# *TypeArgumentsopt Identifier* ( *TypeListopt*
> )
> Cheers,
> Neal
>
More information about the closures-dev
mailing list