Home > Backend Development > Python Tutorial > Will python replace java?

Will python replace java?

(*-*)浩
Release: 2019-06-21 13:52:48
Original
3341 people have browsed it

What is the hottest programming language now? Of course it is-Python. Did you know? Even primary school students are starting to learn Python now.

Will python replace java?

Python has also been making rapid progress in the programming language rankings, jumping to the fourth position. Now besides the old Java, C and C, who else can compete with Python? For example, with the continuous efforts of the masters, Python can now do almost everything, build webs, make crawlers, and engage in AI. Moreover, Python has many libraries, so Python development efficiency is extremely high. In addition, Python can also be used with other languages. A good joint development of two languages ​​​​(commonly known as the "glue language"), Python is simply an invincible, omnipotent and perfect language style, right?

So will Python surpass Java in the future?

Won't. (Recommended learning: Python video tutorial)

Python is still several blocks away from true perfection? Why do you say that?

First of all, Python does not have an advantage in execution efficiency. Since Python is an interpreted dynamic type language, it is inherently slower in execution speed. Needless to say, it cannot compare with C, and it does not have an advantage even when compared with Java, which has always been weak in speed. This limits the possibility of using Python on some projects that require high execution efficiency.

Secondly, in terms of cross-platform, Python does not have an advantage over Java. Now JVM supports almost all available platforms, and quite a few platforms come with their own JVM. , so Java programs can be used directly on the platform where the JVM is installed, while Python requires a compiler to convert the code written in Python into the code of the specified operating system before it can be used.

Finally, the characteristics of Python determine that it is currently not very suitable for the development and maintenance of large projects. If the first two points may be improved to some extent with the development of Python, then Python is naturally lacking in maintainability. Many people who are new to Python find it very enjoyable to write programs in Python. In the past, when writing codes in C, C and Java, they always felt that they were subject to various constraints. For example, variables must be defined before they can be used, only one variable can be assigned a value at a time, and parameters return values. There can only be one. . . . , but in Python, these are not problems, you can write whatever you want, as if you suddenly took off the shackles and handcuffs when dancing.

However, It is precisely because Python is too free that Python programs have poor maintainability when writing large programs. Java is much better at this point, because Java encourages structurally standardized interface design and concise code relationships, coupled with Dependency Injection, making Java code highly reusable. There is no concept of interface in Python, which results in the lack of precise design of all classes when writing. In addition, new members can be added dynamically, which makes code reuse quite difficult.

So, Python does have quite a few advantages. In addition to some of its own excellent features, its rise also happens to catch up with the current development of technologies such as big data and artificial intelligence. This makes Python’s advantages be It has been enlarged a lot. Of course, it is undeniable that Python still has very good development prospects in the future, but if it can replace Java and reach the top, I am afraid there is still a long way to go.

For more Python-related technical articles, please visit the Python Tutorial column to learn!

The above is the detailed content of Will python replace java?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template