Everyone must be tired of reading such as Python Simple and easy to use 、 There seems to be a lot of talk about high flexibility , It's like an introduction without saying anything . Let's say something grounded —— In the limelight Python.
Now? Python It's hot , How hot is it ?
I am often in App I saw a video ad in the , The form is slightly different , But generally speaking, there are only two roles , A fierce supervisor and a troubled subordinate , The fierce supervisor assigned a very urgent job , Troubled subordinates scratch their ears and cheeks , Wronged that it is impossible to catch up with the spreadsheet , The fierce supervisor is even more fierce at this time , Operate in a snap , Talking and using Python as long as 5 In minutes , Don't hurry to learn !
I think the most interesting part of this advertisement , Is that both characters are in suits , At first glance, I am not a programmer , It's more like being used to sitting with a serious face CBD Business people who blow air-conditioning in the air , I used to think this was a part of advertising planning Bug, Every time I see here, I am amused by the contrast , Until one day , A financial friend asked me Python It's not easy to learn , I not have understood until then Python It's really out of the loop .
Say a bit first , Although now no matter inside or outside the circle , When it comes to data analysis 、 Machine learning and even artificial intelligence , It seems to have been said Python, however , These fields do not have to be Python, If nothing else , Say artificial intelligence .
There are many languages in the field of artificial intelligence , If you had studied artificial intelligence a few years earlier , May even Python You can't see the shadow of , What people generally recommend is LISP、Prolog, Even the insiders think that these languages are old and unorthodox , In especial Prolog, It seems that you can't see it anywhere except artificial intelligence , however Prolog Rule derivation has a miraculous effect , We have been using it for a long time .
Now? ? Not much now , One reason is that machine learning based on statistics has always occupied the top position of artificial intelligence , Not much is said about rule derivation , Second, yes Python Rise rapidly , said “ The first language of artificial intelligence ”, Even rule derivation can be used Python To do it .
Another example is data analysis , It was earlier R The world of language , Later it was R and Python Two parts of the world , Now the east wind of artificial intelligence is coming ,R Completely unable to parry Python The momentum of rapid development , So these foreshore waves are naturally photographed on the beach .
however , This is the result , Now what we want to ask is : Why? Python Can be “ The first language of artificial intelligence ” Well ?
Now? Python It's hot , So introduce Python There are a lot of articles , Everyone must be tired of reading, such as Python Simple and easy to use 、 There seems to be a lot of talk about high flexibility , It's like an introduction without saying anything . Let's say something grounded .
Let me see ,Python The biggest advantage is **“ The bag in ”**.
If you rent a house , You must see a word , It's called “ The bag in ”, This word is often used as an important selling point of renting a house , It also reflects an important demand of consumers for rental housing .
What is "bag check-in" ? The exact definition of this word is controversial in the rental industry , Many people are wondering whether having a complete set of furniture and appliances is the same as carrying a bag , But the meaning is clear , As a tenant , Don't prepare anything , Just pull your luggage over and you can stay , This is the bag check-in .
let me put it another way , There are a lot of rental housing is not up to the standard of the bag , Originally, I just wanted to be satisfied “ live ” The need for , But because of the lack of rental conditions , As a result, I had to play a guest role as a decorator first , You need to make some other preparations first , Then I can do what I want to do .
Okay , Back to programming languages . Many people like from the language style 、 Compare the advantages and disadvantages of programming languages from the perspective of grammar design and even grammar sugar , however , I value another thing more : ecological environment .
We used to say C++ How popular , Later he said Java How popular , Now it's my turn Python, After all “ Net red language ” What is behind the success of ? Is it really just because of the excellent design of the programming language itself ?
In my submission , Whether a programming language is popular , Of course, design is a very important factor , But the maturity of the ecological environment may be the more direct reason . One of the questions we often hear about programming is ,A Language has long been out of date , Now there are emerging B Language , Why use now A Language development projects ?
There are usually two possibilities for this problem , One is that the project has used A The language has been extensively developed , Replace with B Language has to rise from the ground , The other is B The language is too new , There is no library available or easy to use in a specific field , It also has to rise from the ground . Both can be attributed to the same reason : Use B Language does not carry a bag .
Python The success of the , It's also because I can check in with my bag .
Think back to the previous advertisement , Talking and using Python as long as 5 You can finish the seemingly endless work in minutes , Why? ?
Not because of who Python How exquisite the language design is , Others have to write 10000 lines ,Python Just one line , It is Python There is a very mature ecological environment , You throw a task here , use Python Don't start from scratch , Just find the corresponding library , A word of import Add a few lines of code , Maybe the result will come out .
From beginning to end , You just need to focus on the task itself , There is no need to think about how the programming language handles implementation , There is nothing to waste time on . This is called bag check-in .