Lambda Tree API changes feedback

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Fri Nov 16 00:49:08 PST 2012


On 15/11/12 23:30, Michael Nascimento wrote:
> Hi,
>
> Some feedback / questions:
>
> - What is the purpose of having a special getBodyKind() in
> LambdaExpressionTree? Why isn't the regular getKind() in the Tree
> returned by getBody() enough?
Yeah - that should be enough - however since the spec stresses 
difference between statement/expression lambdas I thought it might be 
useful having it more explicit
> - Isn't the grammar in MemberReferenceTree supposed to use :: instead of #?
sure
> - Any reason for not providing a super interface between
> IntersectionTypeTree and TypeParameterTree or MethodTree and
> LambdaExpressionTree?
These are distinct concepts - a type parameter might have a bound that 
is an intersection type, but it's not itself an intersection type. Also, 
a lambda looks like a method declaration, but it's not - it's an 
expression and not a symbol declaration. Those differences, in my mind, 
are enough to justify use of different interfaces (with bit of duplication).
>
> Great work, guys, I didn't expect the Tree API to be updated already.
>
> Regards,
> Michael
>



More information about the lambda-dev mailing list