tags:

views:

151

answers:

2

I download the last Java build b96- Feature Complete for testing the new JDK features but I can't figure out which syntax using for testing closures!

Can I test it?

Which syntax has been approved in the final release?

+2  A: 

I can't be certain, but I think this syntax:

  // function expressions
  #(int i, String s) {
    System.println.out(s);
    return i + s.length();
  }

  // function expressions
  #(int i, String s) (i + s.length())

  // function types
  #int(int, String)

Is going to make it through as per http://docs.google.com/Doc?id=ddhp95vd_0f7mcns

gnucom
Looks like all comments here :)
KennyTM
Heh, I guess stackoverflow.com is going to have to update their highlighting engine once they release java 7.
gnucom
Again, FCM is not really the basis for project-lambda and the syntax is not final.
ColinD
@ColinD - and is why I said I can't be certain. We can make educated guesses, and I thought that is all we're doing.
gnucom
+2  A: 

To answer your question, no final syntax has been approved and, despite M8 being listed as the feature-complete milestone, it doesn't have all the proposed features. You can read here about the feature in its current form, but much discussion is going on now and it has quite a ways to go. Additionally, the syntax is going to be revisited and likely changed (at least some) later, once more pressing issues are worked out.

Also, project-lambda code is being worked on in a fork of the main line JDK7 (I believe), so I don't think any of it would be in the build you downloaded.

ColinD
but the final release of Java should be released in September... so, is unbelievable, that at this time no syntax has not been already choosed!!!! May be the last release will be released in 2011?
xdevel2000
Oracle hasn't said anything one way or the other about the schedule slipping, but it seems likely that it has.
ColinD