Project Lambda: Java Language Specification draft 0.1.5

Peter Levart peter.levart at marand.si
Wed Feb 17 00:28:05 PST 2010


Ok, I wasn't precise enough - I meant Throws to use '|' to delimit exception types.

The point of combo I wanted to emphasize was "consistency". Like for example with arrays we have:

Type[]  // representing array type
new Type[IntExpression]  // representing array creation expression
ArrayExpression[IntExpression]  // representing array element dereferencing expression

All three constructs are somehow similar and therefore easy to comprehend.


Regards, Peter

On Tuesday 16 February 2010 19:41:35 Neal Gafter wrote:
> Because throws clauses can have commas in them, this grammar is ambiguous.
> 
> On Tue, Feb 16, 2010 at 9:44 AM, Peter Levart <peter.levart at marand.si> wrote:
> > On Saturday 13 February 2010 15:25:43 Paul Benedict wrote:
> >> What happened to the self.invoke() syntax? A barrage of people came
> >> out saying self.() looks like a syntax error (I agree); I don't recall
> >> anyone advocating the syntax after the first draft was released.
> >>
> >
> > What about the following combo:
> >
> > FunctionType:
> >    ReturnType #(ParameterTypes) Throws
> >
> > LambaExpression:
> >    #(Parameters) Block
> >
> > LambdaInvocationExpression:
> >    FnTypeExpression . #(ParameterExpressions)
> >
> >
> > The magic '#' is allways where a method name is expected in established syntax. I think this wouldn't be hard to explain to newbies.
> >
> >
> > Regards, Peter
> >
> >
> 


More information about the lambda-dev mailing list