Project Lambda: Java Language Specification draft
Neal Gafter
neal at gafter.com
Sat Jan 23 13:04:34 PST 2010
On Fri, Jan 22, 2010 at 2:55 PM, Alex Buckley <Alex.Buckley at sun.com> wrote:
> FunctionType:
> '#' ResultType '(' [Type] ')' FunctionThrows_opt
>
> FunctionThrows:
> '(' 'throws' ExceptionTypeList ')'
>
> ExceptionTypeList:
> Identifier
> ExceptionTypeList '|' Identifier
>
> The notation #T(S1..Sm)(E1..En) indicates a function type with return
> type T, formal parameter types S1, S2, ..., Sm, and checked exception
> types E1, E2, ..., En.
What is the relationship between this notation and the syntax for a
function type, which precedes it? Is there some association of the
"return type" with "ResultType"? Is there some association of "formal
parameter types" with "[Type]"? Is there some association of "checked
exception types" with "FunctionThrows"? Is there some reason that we
have two notations for what I suspect are intended to be the same
thing?
How are varargs function types specified? What are their subtyping
relationships with other types?
Why is the vertical bar used to separate exception types in the throws
clause, instead of commas as are used in methods?
More information about the lambda-dev
mailing list