In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly shows you the "sample Analysis of JIT of Java", which is easy to understand and well organized. I hope it can help you solve your doubts. Let the editor lead you to study and learn the article "sample Analysis of JIT of Java".
James Gosling, a Canadian computer scientist, completed the original design of Java and implemented the compiler and virtual machine of the original version of Java. He is also recognized as the "father of Java".
Grigory Petrov, a technical evangelist (DevRel) of Evrone, an enterprise software development company, recently interviewed James Gosling.
James Gosling talked a lot about programming languages in this interview, such as his views on the new features of modern programming languages, how to view the destructive changes caused by programming language updates, and why not all programming languages use JIT technology.
Grigory: we hope to organize the Python, Ruby, Java and Go communities in Russia as software developers and software consultants. Through this interview, I hope to show the basic problems of the industry and help my fellow developers. Your experience and work experience in Java can help developers become better, so let's try to achieve this goal together.
Some programming languages, such as Go, abandon classes and inherit these features. At the same time, other languages are experimenting with new features, such as traits in Rust. As a language designer, how do you think programming languages should be combined (Composition) in a modern, universal, and reasonable way?
James: I should continue to use classes because I find classes very effective for this scenario. In fact, I don't have any good and clear ideas about how to do different things. In C language, the existence of macros is almost a disaster, because macros are not part of the language, but features outside the language. Rust just wants to use macros in the language in the right way.
For other programming languages, such as the Lisp family, they have a set of ways to define grammars that are almost semantically independent. I have written a lot of Lisp and indulge in the technology of using Lisp programs to operate Lisp programs. Some languages allow you to do this in different ways, such as Groovy, where we can use AST directly. On the other hand, Rust has syntax-integrated macros.
Lisp generates new code by calculating code snippets, which is also often used in the Java world. Although it is a very low-level method, it is very popular. Because developers can combine annotations and generate bytecode in different languages, this is a very powerful technique that is often used in unexpected scenarios. The Jackson framework, for example, improves performance by computing serializers.
Of course, this is a powerful technology, but it is also very difficult to control. This technology is full of possibilities, but the possibilities are limited. I have strong feelings of love and hate for Lombok. It adds a lot of excellent Java features, but on the other hand, it also exposes its weakness. Because some features are supposed to be built-in functions.
Grigory: we recently interviewed Yukihiro Matsumoto, the author of Ruby, who mentioned that he had done an experiment in the latest major version of Ruby 3.0. He tried to release this version without introducing destructive changes and see what happens. I know that Java is cautious about "destructive". So is it a good idea to consider compatibility in all programming languages, and is it a good idea to be compatible with every major version? Or is this only for specific languages, such as Ruby or Java?
James: it almost entirely depends on the size of the developer community. Every major change is a problem for developers, and destructive changes are not a big problem if there are not many developers in the community. Cost-effectiveness must also be weighed. If a destructive change is added, it will add to the burden, but at the same time it will bring some benefits, so consider it. For example, if you change the subscript operator from square brackets to parentheses, it may not bring any benefit and cause great annoyance to developers. Then this is a stupid change.
For example, JDK 9 introduces an extremely rare destructive change: if developers use some so-called hidden API, the encapsulation mechanism will be disrupted, and developers who break encapsulation boundaries and use API in ways that should not be used will encounter a lot of problems upgrading from 8 to 9.
There is also a situation where there is an error somewhere and the developer implements a workaround for the error. In this case, if the error is fixed, it is possible to damage these workarounds. There are also such cases in Java, where we either do not fix the error or introduce the correct implementation.
Grigory: let's talk about the development of enterprises and industries. I've never had the experience of programming robots myself, but I worked for a time in a company that created software for millions of people. Comparing today with 2025, I find that social coding platforms like GitHub are supported by giant companies that help individual developers and corporate or industrial software developers develop open source. So can we think that this is the golden age of open source software? what do you think?
James: I don't know how to answer that, because this question is about the future. The idea that "this is the golden age of open source software" implies that "is it going downhill from now on?" If this is the golden age, then the future will not be the golden age?
So my view is that no matter what the golden age looks like, our environment is getting better and better, getting closer to the ideal "golden age" step by step. At present, we are faced with various crises around security and human cyber terrorism. When this kind of thing is still happening or is happening, I don't think this is the golden age. If there is some way to end cyberterrorism-it will be a very "golden" era, let's wait and see. What I want to say is that this is a really great era, but it can get better.
Grigory: you use JIT technology in Java and JVM. JIT brings amazing speed without affecting the elegant syntax and advanced features of the language. Many programming languages refer to Java, such as C # and JavaScript, which recompile code through hot path compilation at a rate similar to that of C and C++. But many other languages, such as Python, Ruby, and PHP, have optional JIT, but they are not so popular. Many major programming languages also do not use JIT to improve performance. So why don't all programming languages use JIT to provide faster speeds for developers?
James: in fact, statically typed languages are better suited to improve performance through JIT. For dynamic languages such as Python, this is actually very difficult. Usually what you end up doing is adding annotations to the language, and you get a programming language like TypeScript, which is essentially JavaScript with type annotations. This is interesting because JavaScript is essentially a Java that removes type declarations. Therefore, TypeScript is essentially a Java with mixed syntax.
But if you are a developer who writes scripts quickly in Python, in their opinion, declarations bother them, and thinking about the types of variables is very annoying. Most developers in the world of scripting languages don't care about performance. They care more about whether they can complete the development as quickly as possible, and they don't care about performance and related details.
Grigory: there is a non-technical problem. When we talk about different languages, in your personal opinion, for beginner developers or related majors, which language should be chosen as their first language to learn?
James: I'm sure I'll be a little biased in my answer to this question. After all, Java has been used successfully for so many years. But the first programming language I learned myself was PDP-8 assembly code, and I learned Fortran at about the same time. So I think for beginners, we can teach them anything, because everyone's learning ability is different.
However, on this issue, I think more consideration should be given to the future career path of beginners. If you want to become a well-developed software developer to build a large-scale high-performance system, then the JVM language can not be bypassed, no matter what kind of JVM language you are learning. For example, Clojure, Scala, and Kotlin. But if I was a physics major, I would tell him that Python is also very good.
In fact, I don't think it's a big problem which programming language to choose as the first language to learn. Although many people will stick to the first language they learn, it would be better if they could learn multiple languages and switch back and forth. I even think that universities should offer courses that compare the advantages and disadvantages of programming languages. The course is designed to complete assignments in five different programming languages, which allows students to learn these languages quickly, because there is not much difference between them. However, in this way, students will think about the advantages and disadvantages of language.
I took courses like this a long time ago, such as using Cobol to do numerical calculations and Fortran to do symbolic operations. For both languages, these tasks were not their areas of expertise, but I finally got an A grade.
The above is all the contents of the article "sample Analysis of Java's JIT". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to 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.