Slow speed , Runtime problems and mobile application development dilemma “ destroy ” Yes Python The future of

It took decades for the programming community to embrace it Python. But since 2010 It has been booming since the beginning of the year , The heat is finally comparable C,C#,Java and JavaScript.

But how long will this trend last ? when Python Will be replaced by other languages , Why? ?

Python The time of its demise is difficult to predict , So I won't give the exact time , It's about assessing what's going on right now Python What are the advantages of popularization , What defects will lead to its decline in the future .

<> What advantages create Python Today's fashion situation

Python Success from Stack Overflow You can see the leopard in the trend . This trend data counts the number of tags in posts on the platform . Whereas Stack Overflow
The huge scale of , This is a good indicator of the popularity of programming languages . last , If your time is not very tight , And want to improve quickly , The most important thing is not afraid of hardship , I suggest you can contact Wei :762459510
, That's really good , Many people are making rapid progress , You are not afraid of hardship ! You can add it and have a look ~

StackOverflow Snapshot of the number of tags in various programming languages on the .

R It has been stable in the past few years , The popularity of many other languages is steadily declining , but Python The growth of seems unstoppable . about 14% of Stack Overflow
Questions are marked as “python”, And the trend is rising .

There are several factors behind this phenomenon .

<>Python have a long history

Python from 90 It appeared in the s . This not only means that it has enough time to grow , It also gained a huge support community .

therefore , If you're using Python Any problems encountered during programming , There is a good chance to solve it through a Google search . Because it's likely that someone has encountered your problem , And wrote some useful schemes for this .

<> It is friendly to beginners

This is not just because it has existed for decades , Give programmers time to make wonderful tutorials . what's more Python Your grammar is very easy to read .

first , It does not need to specify a data type . You just need to declare a variable ;Python It will be understood from the context that it is an integer , Floating point value , Boolean or other value . This is a huge advantage for beginners . If you use
C++ Compilation process , You will know how frustrating it is to make a program unable to compile just because a floating-point number is replaced by an integer .

If you compare Python and C++ code , You'll know Python How easy to understand . although C++ Readability is considered in the design , But with Python
Code comparison , It's still quite hard to read .

<> It has a wide range of uses

because Python It has existed for a long time , Developers have made packages for many purposes . nowadays , You can find packages that apply to almost everything .

Want to deal with numbers , Vector and matrix ?NumPy It's your good helper .

Want to do calculations for the technology and engineering industries ? Please SciPy.

Want to expand in data operation and analysis ? try Pandas bar .

Want to get started with artificial intelligence ? Why not Scikit-Learn And .

Whatever computing task you try to manage , There may be one Python Package available . This makes Python Always at the forefront of Technology , From the field of machine learning in the past few years Python
The surge in usage is evident .

<>Python Defects of , Will they shake the foundation ?

As mentioned earlier , You can imagine Python It will maintain high heat for a long time in the future . But like all technologies ,Python
It also has its weaknesses . I will analyze the most important defects one by one , And evaluate whether these defects are fatal . last , If your time is not very tight , And want to improve quickly , The most important thing is not afraid of hardship , I suggest you can contact Wei :762459510
, That's really good , Many people are making rapid progress , You are not afraid of hardship ! You can add it and have a look ~

<> speed

Python Very slow , It's really slow . On average , use Python The time required to complete a task is in any other language 2 reach 10 times .

This situation is caused by many reasons . One of them is Python Is a dynamic type —
please remember , You don't need to specify data types as in other languages . This means that it uses a lot of memory , Because the program needs to reserve enough space for every variable it may use . A lot of memory usage means a lot of computing time .

Another reason is Python You can only perform one task at a time . This is a consequence of flexible data types ——Python You need to ensure that each variable has only one data type , Parallel processes may have problems here .

by comparison , Your usual Web The browser can run more than a dozen different threads at the same time . There are other factors .

But in the final analysis , These speed issues are not very critical . Computers and servers have become so cheap , So no matter how slow it is, it is only a sub second gap . End users are less concerned about what their applications are doing 0.001 Seconds or
0.01 Load in seconds .

<> Scope

in limine ,Python Is dynamically scoped . This basically means , When you want to evaluate an expression , The compiler searches the current block first , Then search all calling functions in turn .

The problem with dynamic scope is that every expression needs to be tested in every possible context — It's boring . This is why most modern programming languages use static scopes .

Python Attempt to transition to static scope , But it screwed up . generally speaking , Internal scope — For example, a function within a function — Ability to see and change external scopes . stay Python
in , Internal scopes can only see external scopes , You can't change them . This can lead to a lot of confusion .

<>Lambda

although Python Quite flexible , but Lambda Its usage is quite limited .Lambda Only Python Expressions in , Cannot be a statement .

on the other hand , Variable declarations and statements are always statements . That means Lambda Cannot be used for them .

This distinction between expressions and statements is quite arbitrary , Does not appear in other languages .

Spaces make the code more readable , But it's harder to maintain .

<> Space

stay Python in , You can use spaces and indents to represent different levels of code . This makes the code look more beautiful and easy to understand .

Other languages ( for example C++) Rely more on braces and semicolons . Although it may not be beautiful enough , Not friendly enough for beginners , But it makes the code easier to maintain . This approach is better for larger projects .

Haskell And other newer languages have solved this problem : They depend on spaces , But it provides another syntax for those who want not to use spaces .

<> Mobile development

When we witness the shift of the mainstream of the software industry from desktop to smartphone , Obviously, we need a powerful language to build mobile software .

But use Python Not many mobile applications have been developed . That doesn't mean it can't — There is one named Kivy of Python That's what the bag does .

however Python
Not designed for mobility . therefore , Even though developers may use it to produce acceptable results for basic tasks , But the best way is to use a language created for mobile application development . Some widely used mobile programming frameworks are
ReactNative,Flutter,Iconic and Cordova.

What needs to be clear is , Laptops and desktops should continue to exist for many years . However, the traffic of the mobile terminal has already exceeded that of the desktop terminal , To be sure , Only learning Python
Not enough to be an experienced all-round developer .

<> Runtime error

Python Scripts are not compiled and then executed . contrary , It compiles every time it executes , Therefore, any code errors will appear at run time . This results in performance degradation , It takes more time and requires a lot of testing .

This is very useful for beginners , Because testing can teach them a lot . But for experienced developers , use Python Debugging a complex program will make them go wrong . This defect is in
Python Maximum factor for setting timestamp on .

<> Which language can be replaced in the future Python?

Python There are some new competitors in the programming language market :

*
Rust Provides and Python Same security — No variables are accidentally overwritten . But it solves the performance problem through the concepts of ownership and borrowing . according to
StackOverflowInsights of statement , It is also one of the most popular programming languages in the past few years .

*
Go It's perfect for me Python Beginners . And it's very simple , Code is easier to maintain . Interesting point :Go Developers are on the market One of the highest paid programmers .

*
Julia Is a very new language , Can be with Python Positive competition . It fills the gap of large-scale technical computing : usually , People will use Python or
Matlab, And use large-scale calculation necessary C++ The whole process of Library repair . Now? , People can use Julia, Then you don't have to use both languages at the same time .

Although there are other language options on the market , but Rust,Go and Julia Success made up for it Python
Defects of . All these languages are doing well in emerging technology areas , Especially in artificial intelligence . Although their market share is still small ( just as StackOverflow
As reflected by the number of labels ), But their trend is clear : All the way up .

StackOverflow Snapshot of the number of tags in various programming languages on the .

Given the current Python Language is everywhere , Any of these new languages will certainly take five or even a whole decade to replace it .

What language will the winner be , yes Rust,Go,Julia, Or some new language in the future , It's hard to say at present .

But considering Python Basic performance issues in architecture , There will always be a language .

Technology
©2019-2020 Toolsou All rights reserved,
java Comparing attribute values between two objects utilize Python handle Excel data ——xlrd,xlwt library Bidirectional linked list Why? Python Not a future oriented programming language ?Python【 Assignment statement 】 Special lecture , You can't just a=b ah ! Suggest mastering ! utilize Python handle Excel data ——pandas library see SQL-SERVER Data volume and occupied space of database and each table PID The algorithm finally figured out the principle , It was so simple web Two front-end practical games ( Attached source code ) Beginners learn Python Be sure to know what his basic algorithms are ? What is the function ?