In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "why Python is slowly losing its attraction to programmers". In daily operations, I believe many people have doubts about why Python is slowly losing its appeal to programmers. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the questions of "why Python is slowly losing its attraction to programmers". Next, please follow the editor to study!
Since the release of Python in the early 1990s, it has caused a lot of hype. Of course, it took at least 20 years for the programming community to realize its existence, but since then, it has far outstripped the popularity of Cmaine, Centro, Java and even Javascript.
Although Python dominates the fields of data science and machine learning and to some extent in the fields of science and mathematical computing, it does have its disadvantages compared with newer languages such as Julia,Swift and Java.
What makes Python so popular?
One of the main drivers of the rapid development of Python is its ease of learning and powerful practicality, which makes it very attractive to beginners and those who avoid programming because the syntax of languages such as C is difficult to understand. / C + +.
The language fundamentally widely emphasizes the readability of the code. With its concise syntax, it allows developers to express ideas and concepts without writing large lines of code (as is the case in low-level languages such as C or Java). Python is very simple and can be seamlessly integrated with other programming languages (such as offloading CPU-intensive tasks to C / C + +), which is an added benefit for multilingual developers.
Another reason for the versatility of Python is the heavy use of it by enterprises (including FAANG) and countless small businesses. Now you'll find a Python package, almost everything you can think of-for scientific computing, you already have Numpy,Sklearn (for machine learning) and Caer (for computer vision).
The weakness of Python
Very slow, very slow
It might be easy. Speed is often considered one of the priorities of developers and may last for an unforeseen period of time.
One of the main reasons why Python slows down actually boils down to the fact that 2-Python is interpreted as the opposite of compilation, resulting in slower execution time; and that it is dynamically typed (during execution, Python automatically infers the data type of the variable).
In fact, this view of "slow Python" often plays an important role in beginners. Yes, it's true. But only in part.
Take TensorFlow, for example, which is the machine learning library provided by Python. These libraries are actually written in C + + and can be used in Python, a bit like a Python "wrapper" implemented around C + +. This is even true of Numpy to some extent.
It has a GIL (l)
One of the main reasons for the slow speed of Python is the existence of GIL (global interpreter locking), which can only execute one thread at a time. While this can improve the performance of a single thread, it limits parallelism, in which developers must implement multiprocessors rather than multithreaded programs to increase speed.
Not the best for memory-intensive tasks
Python automatically garbage collects objects when they are out of scope. It is designed to eliminate many of the memory management complexities involved in C and C +. Due to the flexibility (or lack of flexibility) of the specified data type, the amount of memory consumed by Python can explode quickly.
In addition, some errors that Python may not notice may pop up at run time, eventually slowing down the development process.
The weakness of Mobile Computing
The huge shift from desktops to smartphones clearly requires more powerful languages to build software for mobile phones. Although Python is quite representative on desktop and server platforms, Python often loses its advantage in mobile development due to the lack of powerful mobile computing capabilities.
In recent years, a lot of progress has been made in this area, but these new libraries are not even close to strong competitors such as Kotlin,Swift and Java.
The rise of other languages
Recently, newer languages such as Julia,Rust and Swift have sprung up, drawing on many excellent design concepts from Python,C / C + + and Java-Rust almost guarantees runtime memory security and concurrency and provides best-in-class interoperability with WebAssembly; Swift supports the LLVM compiler toolchain almost as fast as C, while Julia provides asynchronous I / O for I / O-intensive tasks and is very fast.
At this point, the study on why Python is slowly losing its appeal to programmers is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.