Re: why no function types?

Remi Forax forax at
Thu Mar 8 11:25:59 PST 2012

It can be translated to a reified function type but using a SAM type is more explicit (no need to add new ruled in the JLS).
Designers can choose if an IntReducer or a Reducer<Integer> is better for a specific API.


Sent from my Phone

----- Reply message -----
From: "Neal Gafter" <neal at>
To: "Remi Forax" <forax at>
Cc: "maurizio cimadamore" <maurizio.cimadamore at>, <lambda-dev at>
Subject: why no function types?
Date: Thu, Mar 8, 2012 19:26
On Thu, Mar 8, 2012 at 10:08 AM, Remi Forax <forax at> wrote:

by example,
 Runnable[] array = { () -> { foo(); } };
is Ok (overdose of parenthesis aside).

Wouldn't that translate into a non-generic function type under the covers, since there are no parameter or return types?  In which case you could do that with function types as well?

More information about the lambda-dev mailing list