Removal of function types

Neal Gafter neal at
Wed Jul 7 10:32:30 PDT 2010

Reducing the scope and making things pretty is nice, but not very useful if
the resulting construct doesn't actually address the needs of API
designers.  The list/array issues are no worse or better for having
eliminated function types, as SAMs were always part of the equation and
generic SAMs have the same issues.

Function types cannot reasonably be added later if APIs have been designed
in the interim that would have been better designed using function types.
I'm specifically thinking of aggregate APIs and extension methods on

Finally, adding function types to Java provides a nice interoperability
basis for lambdas among all of the JVM languages.  There is no
straightforward way to do that using SAMs.

On Wed, Jul 7, 2010 at 10:18 AM, Stephen Colebourne <scolebourne at>wrote:

> The latest (6 July) lambda document removes function types. I support
> this (even though they were in FCM).
> - Removing them reduces the scope, thus increasing the delivery likelihood
> - Function types look pig ugly with exception transparancy
> - Function types are a very different concept to the rest of Java,
> which is very name based
> - Function type don't visually look much like types (which are names
> everywhere else)
> - SAMs centralise the definition of Javadoc and give a meaningful name
> - function types don't
> - Function types were causing trouble when in a list/array due to
> generic erasure
> - Removing them removes some of the most contentious syntax debates
> - Function types can be added later if the right approach is taken (as
> in the doc) of declaring lambda expressions to have no expressible
> type.
> I suggest using this thread to comment on the removal of function types :-)
> Stephen

More information about the lambda-dev mailing list