Home >Backend Development >Python Tutorial >Senior C++ developer says: Python is the best entry-level programming language

Senior C++ developer says: Python is the best entry-level programming language

王林
王林forward
2023-04-08 12:44:561387browse

Translator|Bugatti

Reviser|Sun Shujuan

Phil Nash is C One of the early developers of the testing framework and a development advocate of SonarSource . He believes that new programmers looking for a first language and anyone who wants to add another language to their toolkit should Start with Python.

Senior C++ developer says: Python is the best entry-level programming language

NashTell The New Stack : "Choosing Python is boring, but reasonsexciting. PythonVery easy to get, itisgradually becoming a realprofessional grade , very popular language. I think no other language that meets all these requirements like Python.

Is your first language Python or JavaScript? ​

So,JavaScriptWhat are the problems with using it as the first language? Nash said that JavaScript is a good choice, but it has never been a beginner-friendly language. ##. By the way BASIC: This is a very ## from the 80 era #Popular programming language, the full name of is "Universal symbolic instructions for beginners". It's simple,butit's not avery good language, so people don't Used it to develop professional-grade applications until Microsoft introduced Visual in the 90 Basic.

Nash said that the popularPython is not the same, because it is simple to use , but as developers become more experienced, becomes Then delve into more complex uses, and finallywrite the actual application. Nash believes that JavaScript is also quite simple, but more of it is purely accidental, rather than is intentionally designed. He said: "

JavaScript

originally was designed asOTHER USES,inadvertentlybecame the most popular language in the world,justbecause it basically Bundled with the Web. Therefore, JavaScript is a worth learningexcellentLanguage, but it is not friendly to beginners. On the other hand,

Python

at the same timesatisfiesboth aspects: Beginner-friendly and andvery useful. Nash said: "

It reads more like pseudocode written on paper, when

You sketch out the idea and it gets transformed into actual working code in the production code base. No It’s more suitable for beginners than this. It has also been widely used in industry. He often goes back and forth between Python

and

JavaScript ##Switching,The biggest confusion caused by thisis to figure out whether to add points## at the end of the line #Number.

He said: "This is one of JavaScript's problems #, many are optional. So the semicolon is actually optional, except in OneIn some casesitis notoptional.Python One of the tenets of is that there should be a right way to do things. This is not always true, but in general, it attempts to design things,So that there is an obvious way to do things, the Python way. Everything looks unified,JavaScript is almostthe complete opposite.

Python as a second language: What you should Do you bother? ​

You might say, Python doesn’t matter. Speaking of the web, if you are a front-end/Web developer, JavaScript is indeed the king.

Wish you consider:AnacondaOpen Source PyScriptAfter being released last year, nowmoves to the front-end .

#You can alsouse Python on the backendas a great Web technology, I often do this. Itstill is beginning to show some potential of the front-end language, although is still in the early stages. Now judge whether it willIt's too early to catch on, but it's out there, and ifyou already have Python skills, you can now Claiming or thinking that #yourself is a front-end developer, at least ifyou've tried the waters. Changed to Other languages, I’m afraid I can’t say that.”

ButIt's too late for you now, you have already learned JavaScript or other languages. Nash believes that Python is also an ideal complementary language.

He said: "Python is a great scripting language. It also has complete functionality in this regard because itAimed at problems Scalable.

Another differentiating advantage of Python is,itis aDynamic Language. So, for exampleWhenyoudeclare a variable, you don’t have to say what type of variable it is(Number, String or Boolean). The language infers based on how you use it, much like JjavaScript. This is not the case for Java or C, they are both strongly typed languages. He added that Dynamic languages ​​are generally easier for beginners. Python is a dynamic language, which means that

you

can Make mistakes in your code that are only caught at runtime, whereas statically typed languages ​​will catch errors at compile time. Many people including myself generally prefer statically typed languages ,Especially for more largermore complex code bases. Python now has optional type annotations,Bringsmany benefits, but only ifyou use additional static analysis tools.He added

that Sonar provides a

static analysis tool that can Discover mismatchesof the types used, even in Python. Python can be used as a more complex code base (such as C

)'s friendly front end.

He said: "You canuse Python interface to wrap , and thenIt's easy to write Python code based on this. So this is what most machine learning libraries do, Like they're actually mostly written in C, handle the low-level heavy lifting, and then be nice and relatively simple Python front-end. It is actually an excellent second language. If you want to learn another language, most developersIn the toolkitThere should be Python.

Python is as it is on the machine Famous for its application in learning, it is also a popular language in the financial field,

on the one hand due to NumPy and quantitative sub calculations , which applymathematical and statistical methodsdeal with financial and risk management problems.

He said

: "Quantum computingdevelopers used to use C# almost exclusively ##Process the work, maybe use MATLAB to sketch, and then they will convert the code into C In order to improve performance. But With Python and NumPy, they found that they could actually do it in one software get everything in the package. Their code looks like written in MATLAB but The bottom layer of executes like C. Developers Things you need to know about PythonW

There are two

backends for eb developmentMain Python framework: Django and Flask. Nash uses Flask for Web development.

He said: "Django is more like the traditional Web framework, you have toDoing the Django way. Nowyou are basicallyDjango developer. Flask borrows many aspects from Django, but is less self-contained.You can actually introduce other dependencies to do the way you want, I When programmingI like this.

him

means , and there are countless tutorials and resources on the Internet for learning these frameworks or knowledge related to Python. Python has also appeared #with #operating systems based on Unix (such as MacOS or Linux) ##On the machine. Windows systems can add it, only requires a simple installation. Then just type Python to access it from the command line. Thenit enters an interactive shell(shell) and the developer can immediately Start entering the code. It can also be accessed via an IDE, such as PyCharm (for Python IDE), or through combined with the plug-in of VS Code. Python is not a high-performance language like C or Java, but it is Can also play a role in these programming projects. He said: "In application areas where performance is not important,

Python is usually ideal.Alternativelyyoucan combine it with high performance Languages ​​are used in combination; #Thus achieving the best of both worlds##​Original title: Veteran C Developer Says Python Is Best Starter Language, Author: Loraine Lawson​

The above is the detailed content of Senior C++ developer says: Python is the best entry-level programming language. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:51cto.com. If there is any infringement, please contact admin@php.cn delete