Skip to main content

Poll Result: Expected Impact of Lambda Expressions (Closures) on Programming with Java 8

Posted by editor on May 2, 2012 at 7:09 PM PDT

Brian Goetz recently provided new details on the status of JSR 335 in his OpenJDK document State of the Lambda: Libraries Edition. Project Lambda is a fundamentally important enhancement to Java 8. And, based on the response of developers in our recent poll asking how Lambda Expressions in Java 8 will affect their programming, the Java community is excited by the prospect of being able to implement closures in their applications.

A total of 437 votes were cast, along with a single comment. The exact question and results were:

To what extent do you expect Lambda Expressions (closures) in Java 8 to affect your programming?

  • 34% (148 votes) - They'll have a huge effect
  • 20% (88 votes) - They'll make some difference
  • 16% (68 votes) - No immediate effect (who knows when I'll finally be using Java 8?)
  • 9% (38 votes) - No effect, since closures aren't pertinent to the programming I do
  • 15% (64 votes) - I don't know
  • 7% (31 votes) - Other

These results (which, we recognize, are non-scientific) suggest that a great many Java developers consider the addition of Lambda Expressions to Java a very significant milestone.

Indeed, Java developers have been waiting for the inclusion of closures in Java for a very long time. Most of the long delay between Java 6 and Java 7 was filled with anticipation/hope that closures would be included in Java 7. However, as the years passed, and the uncertainty increased, the decision was ultimately made to split off some aspects of what was originally to be included in Java 7 into the next major release (i.e., Java 8), in order to facilitate getting key functionality out to the community sooner. I think most Java developers would agree this was a good decision (hmm.. this gives me an idea for a future poll!)...

But, getting back to this poll's results: a third of voters say Lambda Expressions will have a huge effect on their programming once Java 8 arrives; and more than half of the voters say closures will make at least some difference in their programming. We can assume that some of the 16% who selected "No immediate effect" will probably find Lambda Expressions useful once their platform reaches Java 8 (though that may be a long time from now).

rdohna wonders if there might be a bit too much enthusiasm for closures in Java, commenting:

They will be used even in cases where it only makes things more complicated than required.

Undoubtedly, that will happen in some cases. All the more reason to have experienced architects carefully communicating the design to the more junior developers...

In any case, it's been a long wait for closures / Lambda Expressions in Java. The wait isn't over yet, but it will be over soon; and developers are eagerly anticipating their arrival.

Current poll: Java Magazine

Our current poll asks Do you read Java Magazine?. Voting will be open until Friday, May 11. Weblogs

Since my last blog post, Rex Young posted a new blog:

Java News

Here are the stories we've recently featured in our Java news section:


Our latest Spotlight is Brian Goetz's State of the Lambda: Libraries Edition:

This is an informal overview of the major proposed library enhancements to take advantage of new language features, primarily lambda expressions and extension methods, specified by JSR 335 and implemented in the OpenJDK Lambda Project. This document describes the design approach taken in the rough prototype that has been implemented in the Lambda Project repository...

Subscriptions and Archives: You can subscribe to this blog using the Editor's Blog Feed. You can also subscribe to the Java Today RSS feed and the blogs feed. You can find historical archives of what has appeared the front page of in the home page archive.

-- Kevin Farnham

Twitter: @kevin_farnham

Related Topics >>


You might have drawn some possibly erroneous conclusions ...

You might have drawn some possibly erroneous conclusions from this poll. Voting that one expects lambda expressions to have a significant effect on Java programming is not the same as voting that one supports the idea. I think that you should consider the wording of the poll before drawing conclusions about the results of the vote. I am certain that lambda expression will have a significan effect on Java programming. I am not nearly so convinced that the effect is a good thing.

I typically declare that polls are not scientific ...

I typically declare that polls are not scientific when I blog about them. There's a big difference between a survey where anyone who wants to vote can vote, and a scientifically constructed poll that asks specific individuals (who are considered to be a representative sample of an entire population) what their opinion is. So, my blogs about the polls are really just chit-chat about the topic at hand, since I have no genuine scientific data to go on.

So, in this particular poll, I was asking those who chose to vote to tell us the extent to which they expect Lambda Expressions in Java 8 to affect their own Java programming. Many state that they expect their own programming to be affected -- which was the gist of what I was trying to say in my commentary on the poll results.

When I talked about how long many Java developers have been waiting for closures in Java, and how they've anticipated this enhancement, I was actually switching to talking about history, rather than talking about this specific poll. That's why I say "But getting back to this poll's results..." in the subsequent paragraph. But, perhaps I didn't make this sufficiently clear.

Your comments (along with the comment rdohna posted to the poll) suggest a new poll that asks if developers consider the addition of Lambda Expressions in Java 8 to be a good thing or not. I'll credit you and rdohna with inspiring the idea when I make that poll live!