Home >Backend Development >Python Tutorial >Python's four challengers: Swift, Go, Julia, R
Nothing lasts forever—including programming languages. A lot of things that look like they might be great in the future may turn out to be forgotten. Whether it is due to irresistible reasons or due to one's own development.
Python is currently on the "most popular programming language list" and looks set to become an immortal language. But now, many other languages are gradually showing some of the advantages of Python: convenient programming, powerful processing capabilities for mathematical and scientific calculations, and huge third-party libraries.
Here are some potential challengers to Python and discuss how Python retains its number one spot.
What is it: A programming language from Apple, mainly used for native iOS development, but now it is open source and has a tendency to develop on the server side.
Its advantages: Programming with Swift is a hassle-free experience! It feels more like a scripting language (such as Python) than a compiled language (such as its indirect predecessor Objective-C). Swift's decisive advantage is its speed - it is compiled into machine code by the LLVM compilation framework, so it is truly multi-threaded. Python still struggles in this area.
If development speed is more important than execution speed, Python has an advantage in this aspect. But Swift has the "Playground" mode of the XCode IDE.
Advantages of Python: On the one hand, compared to Python, Swift is a new programming language. Python has all the advantages of mature languages - a large user base, a large number of libraries, and mature multi-platform support. Swift doesn't even support Windows yet (if you don't count third-party libraries), although this is a feature that will definitely be implemented in the future. Swift also relies on Apple's tool chain (such as Xcode), while Python's dependencies are very small.
**What it is:** Google's "expressive, concise, clean, and efficient" language, everything from Docker and its related projects to the InfluxDB database, Ethereum's bad chain system and Canonical's Snappy package management tool are all written in Go of.
Its advantages: Like Swift, the Go language also compiles into platform-specific machine code, so not only can it be much faster than Python in multitasking, it can also not generate additional targets at runtime like Python. Go code compiles very quickly and is developed very quickly, so it is more like an interpreted language.
Python’s advantage: Although Go isn’t as new as Swift—it was released in 2009—Python still has an advantage in terms of the number of users and libraries. In addition, Go's syntax and error handling are far different from Python. Therefore, it is now difficult for Python users to move to Go, but it will not prevent new users from choosing such a language. At this stage, Python's installer makes it very easy to use and build Python applications - not to mention systems like Linux, where Python has become the standard.
What it is: Released in 2012, it is a programming language for technical applications, such as data analysis and linear algebra.
Its advantages: A big use for Python is in mathematical and scientific applications - thanks to libraries like Numpy and the interactive IPython editor. Julia's target users are also the same group. Like Go and Swift, it is also faster than Python. It also has a growing package that includes not only scientific and mathematical computing applications, but also many Python functions, such as retrieving data from cloud providers.
Advantages of Python: Julia has libraries similar to Python, but Python is not satisfied with the status quo and is constantly optimizing the core of the language and the development environment. The speed of Python is not necessarily inferior to Julia (or other Python competitors). As long as you choose the appropriate library for different tasks, the speed is still objective.
There are still some controversies in the Julia language itself. For example, Julia's array subscripts start from 1, not 0 - this is a shortcoming not only compared to Python, but also compared to many other languages. (Many third-party package indexes also start from 1, but it is still very uncomfortable.)
What it is: This is a very old language in terms of both the development environment and the language itself. It is designed specifically for statistics.
Its advantages: R has many advantages of Python, such as rich third-party libraries. But R was born specifically for statistics, and it will still focus on this in subsequent development. Python can also do mathematical and statistical calculations, but it is completely overwhelmed by the R language in this regard.
The R language has also attracted the attention of many large companies. Microsoft acquired a developer of R language standard implementation to serve its cloud data. Hewlett-Packard has developed a distributed R language computing product that can run across multiple nodes simultaneously. This product can completely squeeze Python out of this field in the future.
Advantages of Python: Sometimes, being a general-purpose language also has its advantages. The functions of R language are limited to statistical calculations. Due to the limitations of the development environment, building R language applications is also troublesome. Creating applications using Python is very simple. And R and Python can be easily combined through packages like RPy2.
Microsoft has invested a lot in the R language, but at the same time Microsoft also provides a lot of support for Python, so both languages can work very well on Azure.
Original text: 4 languages poised to out-Python Python
The above is the detailed content of Python's four challengers: Swift, Go, Julia, R. For more information, please follow other related articles on the PHP Chinese website!