hg: lambda/lambda/langtools: Next round of implementation reflecting the latest 'State of the Lambda' draft; implemented features are:

Nathan Bryant nathan.bryant at linkshare.com
Mon Jul 26 09:38:00 PDT 2010

As an end user, I might expect the compiler do the following--in
informal terms:

1) In the presence of overloaded methods, reduce the set of possible
overloads by trying all possibilities and eliminating those that can't
possibly compile.
2) Among the remaining candidates, choose the most specific according to
the usual rules.
3) If there is no "most specific" overload, e.g. because some subset S
of the possible target types have a lub() that is not a member of S,
then it is a compile time error that requires disambiguation by the

This seems simple to implement, simple to specify in formal terms, easy
enough to explain to Remi's students ;), and fairly likely to avoid
surprise, at least in the sense that we stop at step 3 and don't try to
play any further guessing games.
On the other hand, I worry step 1; in the event that the programmer
inadvertently wrote something that couldn't match the intended target,
it could be a source of surprise to eliminate candidates that couldn't
possibly compile. 

Neal, do you have any better ideas? ;)

-----Original Message-----
From: lambda-dev-bounces at openjdk.java.net
[mailto:lambda-dev-bounces at openjdk.java.net] On Behalf Of Neal Gafter
Sent: Friday, July 23, 2010 6:24 PM
To: Joe Darcy
Cc: lambda-dev at openjdk.java.net
Subject: Re: hg: lambda/lambda/langtools: Next round of implementation
reflecting the latest 'State of the Lambda' draft;implemented features

On Fri, Jul 23, 2010 at 1:44 PM, Joe Darcy <joe.darcy at oracle.com> wrote:

> Neal, surely you are aware of times when it is helpful for compiler
work to
> be exploratory and inform the specification when it is later written
> refined.

Absolutely.  I was just hoping for some explanation of the techniques
are being explored, rather than having to refer to the compiler sources
see what language is implemented.  An explanation such as "the actual
is quite complex" doesn't give me any information nor confidence that it
would lead to a tractable specification.

More information about the lambda-dev mailing list