closures after all?

Mark Mahieu markmahieu at googlemail.com
Wed Nov 18 15:49:28 PST 2009


Well it'll be interesting to see the official details, and (to bring it back on topic) see how it interacts with Coin's language enhancements.

// tongue in cheek
try (Closeable closure = #() { System.out.println("YOUR HEAD A SPLODE"); }) {
	// ...
}


Mark


On 18 Nov 2009, at 23:23, Rémi Forax wrote:

> This is because the syntax of the new proposal is very close to the FCM 
> syntax.
> 
> FCM closure:
> #(int x, int y) { return x + y; }
> 
> |Proposed lambda expression or lambda statement (v0.6a):
> ||#(int x, int y) x + y;
> or
> ||#(int x, int y) { return x + y; }|
> 
> 
> FCM function type:
> |#(int(int, int)) plus;|
> 
> proposed function type (v0.6a):|
> #int(int, int) plus;|
> 
> closure conversion and method reference are also identical.
> 
> This new proposal can be seen as a simplified BGGA (for the underlying 
> type system)
> with the FCM syntax.
> 
> In my opinion the only flaw of this new proposal is that function types 
> are not reified.
> So expect warning on cast and no way to do an instanceof on a function type.
> 
> Rémi
> 
> 
> Le 18/11/2009 23:26, Mark Mahieu a écrit :
>> Quite a few others seem to believe it'll be FCM (eg. http://java.dzone.com/news/devoxx-day-3-conference-day-1).
>> 
>> Chinese whispers abound :)
>> 
>> 
>> On 18 Nov 2009, at 21:59, Jorge Ortiz wrote:
>> 
>> 
>>> This link has been floating around Twitter.
>>> 
>>> http://www.javac.info/closures-v06a.html
>>> 
>>> --j
>>> 
>>> On Wed, Nov 18, 2009 at 1:22 PM, Joseph D. Darcy<Joe.Darcy at sun.com>  wrote:
>>> 
>>> 
>>>> Serge Boulay wrote:
>>>> 
>>>>> Maybe reading into this too much, but are closures in pipe after all?
>>>>> 
>>>>> http://puredanger.com/tech/2009/11/18/closures-after-all/
>>>>> 
>>>>> 
>>>>> 
>>>> I'm attending Devoxx as a speaker this year, as has been reported in
>>>> various outlets, Mark Reinhold announced today at Devoxx that JDK 7 will
>>>> have closures, a to-be-developed from of closures smaller than BGGA, and
>>>> that the JDK 7 schedule will also be extended until around September 2010.
>>>> 
>>>> More details will be forthcoming,
>>>> 
>>>> -Joe
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> 
> 
> 




More information about the coin-dev mailing list