" No matter how the naysayers fail ,Python It's still important in the next decade , And will keep pace with the times ."
Python It's a great programming language , It changed the rules of the game , Taking programming to a completely different level .Python The rapid rise of the industry is extremely beneficial , But as it gets more and more popular , But always criticized .
lately , I've seen some articles and videos , They all seem to indicate ,Python The era of glory is coming to an end . from Python There are often criticisms :“ It's a slow language ”、“ Global interpreter lock ”、“ Dynamic type ”,“ Mobile applications lack support ” etc. .
Are all the criticisms correct ? Are they really important ? For the rest of the decade ,Python Can it still be so important and complete ? today , We will analyze the facts , Get rid of some misunderstandings .
There is no denying that , And C、C++、Java And so on programming language comparison ,Python Very slow indeed . Those programming languages are faster , One of the main reasons is , They are statically typed , and Python Is a dynamic type of programming language .
These languages are compiled before they are run , and Python It's compiled at run time .
Python And from other programming languages ( Instead of native code ) Import external library .
In short , These factors lead to Python The main reason for the slow speed , But it's really a problem !
Is it important ?
For end users , It makes little difference . Whether the program is to 0.0001 Seconds or 0.001 Seconds to run , It doesn't matter .
Besides , If your computing speed is an important factor , So it's worth noting that , Assembly level languages will be better than C、C++ even to the extent that Java It's much faster , But few people use them .
However ,Python The faster development speed and overall simplicity make up for its lack of speed .
in other words , It can be done to Python Code optimization , Make it a little faster . Even if the improvement is not significant , But for the most part , There should be no big problem .
Python Global interpreter lock (Global Interpreter Lock,GIL) yes Python A process lock used when processing a process . Usually ,Python Use only one thread to execute a set of written statements . The global interpreter lock limits Python Out of the box parallel programming .
This means that Python in , There can only be one thread at a time . about Python, The performance of a single threaded process is the same as that of a multithreaded process . The reason for this problem is the global interpreter lock .
Is it important ?
The global interpreter lock is Python A controversial feature of . It is introduced to avoid memory leak and deadlock .
It has more negative effect than positive effect on the whole calculation process . however , To a certain extent, it can be done by Python To solve this problem .
Multiprocessing allows you to run multiple unrelated processes at the same time . Multiprocessing is more suitable for CPU Intensive task , It's also worth recommending .
In the mobile development industry ,Java And other programming languages dominate . image Android Studio Applications like this use Java and XML Such a programming language .
Python Provides a variety of developments for computer and server-side systems . But unfortunately ,Python Not suitable for mobile applications . actually ,Python Even considered a weak programming language for mobile based applications .
Is it important ?
A smart phone 、 Tablet computers and other small devices are on the rise .Python Deficiencies in this respect , It may hinder its existence and development as an excellent programming language in the future .
however , Things may not be as expected “ Bleak ”, Because with Python The development of language and framework , It may even open up a market for mobile app development .
It's important to realize that Python Lack of bright spots . however , It's also important to understand how these factors affect the average programmer .
Now let's take a look at let's Python The factors that have become powerful , And why it will be so important in the next few years .
The most suitable programming language for beginners to learn
For beginners with no programming experience ,Python It's a great introductory programming language .Python Easy to learn . It also helps to understand the basic concepts of object-oriented programming .
For anyone , Even people without programming or coding experience , Especially those who plan to be in Data Science 、 Artificial intelligence 、 Machine learning and other areas of further development of people ,Python It's the best way to get started .
It provides a simple way for everyone to access the language .Python It's very versatile , Platform independent . It means Python You can also import basic modules built in other programming languages .
To make a long story short ,Python It's a great introductory programming language , It's worth learning . It can also help switch to other languages when needed .
Popularity and community support
Python It's the second most popular language in the world , At the time of writing , Second only to JavaScript. This kind of popularity doesn't seem to drop soon .
Python And there's a great community , Provides continuous updates and new versions . Generally speaking ,Python There are many big names in the community , To improve Python, They keep updating .
In order to keep up with the development of the programming world , Community members are actively involved in the development of new modules , They continue to develop a lot of resources related to various libraries and frameworks .
In artificial intelligence / Data science dominates
Python Is specialized in performing visualization tasks 、 Exploratory data analysis , Of course , Machine learning 、 Deep learning 、 The same is true of artificial intelligence such as neural networks .
Can pass Python Various frameworks for module and library access , Help to solve the complex problems of machine learning and deep learning .
“Python In the fields of artificial intelligence and Data Science , Few of them have been able to catch up with ”, At the moment , If such an evaluation is given, I believe it is justifiable .
however , There are some emerging programming languages that are emerging , They can also be a threat , Become Python A strong competitor for . I will discuss these three potential programming languages in detail in a future article .
so far ,Python It's a great programming language , It can help you start a data science journey to solve complex machine learning and deep learning projects .
If you are a beginner , I heard these criticisms online , If that's why you think Python Maybe not the best language to learn today , Then you're wrong .
I hope this article can convey such a message : Although some people join in the criticism Python Some of the shortcomings of the trend , In order to catch up “ Fashionable ”, But that doesn't mean that the popularity or performance of this extraordinary programming language will fade away in the next few years .
Python Still important , Objectively speaking , It is regarded as a good choice for beginners to learn an introductory language .
Its contribution to the field of artificial intelligence is enormous , Machine learning 、 The importance of data visualization and deep learning will continue for years to come .
At present, I think python The future is the best , Personally, I am mainly developing in this direction , Here's a full set Python Learning materials , For those who want to learn Python Let's have a little help !
Python All directions are Python Sort out the common technical points , Form a summary of knowledge points in various fields , The use of it is , You can find the corresponding learning resources according to the above knowledge points , Make sure you learn more comprehensively .
This full version of Python A full set of learning materials has been uploaded CSDN, Friends can scan the bottom of wechat if necessary CSDN The official two-dimensional code is free 【 Guarantee 100% free 】.