How about a combo?
Pavel Minaev
int19h at gmail.com
Fri Mar 19 21:26:17 PDT 2010
On Fri, Mar 19, 2010 at 7:49 PM, Neal Gafter <neal at gafter.com> wrote:
> On Fri, Mar 19, 2010 at 5:53 PM, Pavel Minaev <int19h at gmail.com> wrote:
>>
>> > Other than that, I can't make heads nor tails of this proposal.
>>
>> Do you refer to the type inference bit, or to the proposal in general?
>>
>> If the latter, can you be more specific as to what seems troublesome?
>
> All of it. I can't be more specific because I'm having trouble figuring out
> how the parts of the proposal are supposed to fit together.
I must admit that I am completely stumped. In terms of syntax, I
thought that I had explained it unambiguously, especially given the
examples, which don't leave much to speculation. If a more formal
grammar is still desired, I can certainly come up with it, but it
doesn't look like it is what is causing issues with understanding
here. Correct me if I'm wrong.
With respect to how "parts fit together" - I don't understand the
problem at all.
On one hand, there is a function type definition syntax and semantics
taken from Howard's angle brackets proposal - calatogued (at
http://docs.google.com/View?id=ddhp95vd_15gqnv8xqm) as #13 - and
modified by me by replacing # with a reference to a pseudo-class
java.lang.Function.
Then there is a lambda definition syntax and semantics taken from your
arrow proposal - catalogued as #5 - and modified by me by dropping ->
when body of lambda is expression rather than block, and by prefixing
the parenthesized parameter list with an explicit return type.
I do believe that those two proposals thus modified and combined make
most sense - most "Java-like" in appearance, if you want - in their
respective categories. And, so far as I can see, the categories
themselves are fully orthogonal, in a sense that one can easily "pick
& match" separately. In what way do you expect to see them fit
together?
Further references:
Howard's proposal (which already replaces # with a pseudo-class) - I
only referenced the function type part of that, not the lambda
definition part:
http://mail.openjdk.java.net/pipermail/lambda-dev/2010-March/001135.html
Your proposal - I only referenced the lambda definition part of that,
not the function type part:
http://mail.openjdk.java.net/pipermail/lambda-dev/2010-February/000610.html
Does this help?
More information about the lambda-dev
mailing list