Search |
||
Would you like JDK 7 to support closures?Yes
41% (435 votes)
No
21% (222 votes)
Not sure
10% (108 votes)
What's a closure?
27% (287 votes)
Total votes: 1052
»
|
||
|
|
In the "not necessary" camp
WIll they be serializable?
WIll they be serializable?
allow inner classes to access non-final local variables
Better Idea
No More Language Changes for a While
I love closures, but...
- Why? What are the use cases for closures? These solve some problems, sure, but is it really so important that we need a major language change?
- Is someone going to go back and rewrite the collection APIs to take advantage of these? How about the Swing listener mechanism?
Personally, I would like to see the following poll added to java.net: "Should Sun create a new statically-typed language rather than add new features to the Java language?" My problem is that I think Java is getting harder and harder to learn and teach. I would like to see a new statically-typed language with proper templating, closures and all the other things that people like from other languages with a single, unified approach. Like Groovy, as it's in the JVM it'll be able to interact very easily with existing Java code. This means Java stays nice and stable and the wizzy features can be added to a new language - "Java 2" (the marketing people will love it!).No thanks
Better syntax maybe
Better syntax maybe
Better start from 1.4
Not needed - further clutter
Not needed - further clutter
No please.
No please.
Closures is not what Java needs most...
Closures is not what Java needs most...
Closures is not what Java needs most...
Closures is not what java needs...
Closures is not what java needs...
Its just a contributory factor to complexity than a language fea
let's not mess up the language even more
Perhaps useful, but not enough
closures
Collection col = collection.collect( (each) { transform(each) });And the datatype of the closure would be Closure (or Block if you prefer) but there could be subclasses for 1, 2, 3, or variable args. That brings me back to my original question.. isn't this just syntactic sugar for inner classes? Java made mistakes because it was affraid of C#, now Ruby appears and we have to cave in to that new trend? What's next? Declarative Java? (O crap, they already added that.. annotations).Syntactic sugar is sooo sweet
Syntactic sugar is sooo sweet
// instead of addActionListener(new ActionAdapter() { public void actionPerformed(Event evt) { ... } ); // make it (w/o adding new weird declarations) addActionListener( new ActionAdapter.actionPerformed(Event evt) { .... });Still just as ugly though. Are closures even cool in a statically typed language?I have nothing against closure but I don't like the syntax that
I have nothing against closure but I don't like the syntax that
while we're at it,
while we're at it,
Closures yes. Function types no.
About time & great suggestion
Hard choice
About time!