Update on Closures Coming to Java 7
Java is changing the world around us in major ways. Here is how.
Join the DZone community and get the full member experience.
Join For FreeThis article was originally published on November 19, 2009.
What People Love About Java
People love all kinds of java, including coffee, but we are more specifically talking about the coding program that is behind so many of the online products that we all know and love. That version of Java is something that people have sincerely taken to heart as something that they can use and benefit from.
This is why it is always devastating for people to hear that there may be some closures coming to the Java system (more on that later). They just want to be able to use Java to the fullest extent, and knowing that it will be losing at least some of its functionality is not welcomed news for anyone.
A Program With Real Longevity to It
It is fair to say that many programs that are part of the Internet ecosystem are relatively new to the world. That is to say that you don’t see too many programs come out that are brand new.
They are useful in many cases, but they don’t necessarily have the long track record that some are looking for when they decide on a product that they might want to use for their own coding purposes.
The fact that Java has more than 25 years in existence means that it is the kind of program that people know that they can trust. It has simply been around longer than the others, and people have come to trust that it can get the job done properly for them every time.
There are not too many situations when you can say that you can fully trust your coding programs the way that people say they trust Java, but this is one program that many coders are willing to give their full endorsement to.
That says a lot about what this program is and how it has brought a lot of hope and usefulness to many people throughout the years. It is truly something to behold, and we should all make sure we appreciate what Java has done for the betterment of all of our lives.
Always Improving
It is not as though the people behind Java put it out into the world and then just let it be. No, they took great pains to make sure they were always improving the program, and that is exactly what they have done. By using the various tools contained within it, one can certainly benefit handsomely from the use of Java and the many updates that are provided within it from time to time.
In fact, many people will tell you that they only trust Java to get the work done that they know needs to be done. They don’t trust other products to provide them with the constant updates that Java does.
The fear of being left without an option for how to deal with a particular set of issues that could come up at any time when programming is a legitimate concern for many people, and it is so nice to know that there are teams that are working on this problem and doing their best to make sure you aren’t left without any answers for how to get the help that you clearly need from them.
There is really something to be said for a team of people who will go out of their way to continue to update a product for their customers year after year because they understand just how much the world relies on it.
Memory Management
There are many coding projects that require a significant amount of memory to be contained within them.
Users understand that if they don’t work hard at keeping their projects well-maintained within these systems, then they are going to have some potentially serious issues to deal with going forward. Luckily, the memory management systems that are used by Java are second to none.
You will see for yourself just how amazing the work is that Java does when you give them a chance. They continue to plow ahead day and night to make sure your project always has the memory capacity that it needs no matter how large or small that project is.
You can bet your bottom dollar that this service will come through for you in the ways you need it to. Don’t take a risk with your critical data infrastructure. You need to make sure it is all backed up and ready to go when you call upon it. Trust Java to keep that data safe for you now and forever.
Excellent Building Tools
The tools contained with the Java program are excellent in many ways. You can use them to build out projects that are much more powerful and user-friendly than ever before. If you are really interested in creating something that will be seen and remembered, just make sure you spend your time taking care to get the tools of your project built out just right.
There are many things that can potentially go wrong with a project if you are not very careful about how you put it together. Thus, you will want to make sure that you are always using the Java program and the incredible tools that back it up. You cannot afford to spend your precious time working with something that won’t hold up how it is supposed to for you.
Take all of this into consideration and make sure you put out the kind of quality work that you need to in order to stay on top of your game today. It is really as simple as deciding that you aren’t going to risk letting another day pass you by as you use inferior tools when you could simply use Java instead.
It was announced yesterday that closures would be added to JDK 7. Mark Reinhold made the announcement at the Devoxx conference. Before today, Sun could not reach a consensus on the inclusion of closures in JDK 7. Three proposals for closures were submitted to Sun over the last few years. With the JDK 7 schedule extended to September 2010, Reinhold seems to think that now is the time to bring closures to Java.
A few more details about the closures announcement for Java 7 surfaced today. According to Stephen Colebourne's blog, Mark Reinhold's Devoxx announcement indicated that "JDK 7 closures will not have control-invocation statements as a goal, nor will they have non-local returns.
He [Reinhold] also indicated that access to non-final variables was unlikely. Beyond this, there wasn't much detail on semantics, nor do I believe that there has been much consideration of semantics yet."
Here's a strawman syntax for closures that Mark Reinhold wrote on his plane ride to the conference:
// 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)
The syntax resembles the FCM closure proposal, but Reinhold made it clear that he was using FCM as an example and not endorsing it. Joseph Darcy from Sun said the closures would be "Smaller than BGGA." A few weeks before the conference, Neal Gafter, a co-author of the BGGA closure proposal, wrote a simple specification for closures in Java.
Opinions expressed by DZone contributors are their own.
Comments