In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is about how Lambda can fundamentally change the way we develop Java programs. The editor thinks it is very practical, so I share it with you. I hope you can get something after reading this article. Let's take a look at it.
Today's mainstream programming languages all absorb the powerful concept of closure, but with one exception, it is Java. For years, the work of adding closure features to the Java language seems to have made no progress.
As early as 15 years ago, Martin Odersky and Phillip Wadler, authors of the Scala language and TypeSafe framework, released the experimental "Pizza" project, and people began to try to incorporate closures into one of the basic features of programming languages. Although this may seem a little too complicated, the Java community probably had the idea of embracing the concept of closures in 2008. However, due to Oracle's hasty acquisition of Sun Microsystems, Java has been snubbed, and the release of new versions of the Java language has been constantly delayed.
But things have changed a lot in Java8, and the Java language has finally equipped the Java programming force with closure weapons. "this is probably the most important upgrade in the history of the Java programming language," said Brian Goetz, Oracle's Java language architect. He points out that the impact of introducing closures in Java on Java programming methods is even greater than the impact on programming methods of generics introduced in Java5. "just as generics enable developers to abstract data types, the purpose of Lambda is to enable programmers to abstract program behavior."
The name Lambda comes from the Lambda project that binds closures to the Java programming language. What can be done with the introduction of Lambda and closures? You can think of it this way, it allows programmers to use a piece of program code as data. A method can be defined and used in the same way that a variable is defined and used, and the defined methods can be passed as parameters to other methods as if they were an object instance or a type data. "it seems like it doesn't matter, but in fact it has a huge impact," Goetz said. "this will fundamentally change the way we develop java programs."
We waited too long, but with the release of Java8, Lambda finally became one of the official features in the Java specification. A syntax that is so complex that it was originally abandoned by traditional programmers will eventually become a standard technology that can be seen in every modern Java application.
This is how Lambda fundamentally changes the way we develop Java programs. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.