Bye bye Python. Hello Julia!

This article was published by Rhea Moutafis in May 2020, "[Bye-bye Python. Hello Julia!](Https://towardsdatascience. com / bye-bye-python-hello-julia-9230bff0df62) ”is a Japanese translation. This article is published with permission from the original author.

Bye bye Python. Hello Julia!

Python's momentum is stalled and new competitors are emerging


日没の前に彼女の顔を覆っている帽子の女

Don't worry if Julia is still unknown to you. Photo by Julia Caesar on [Unsplash](https://unsplash.com/s/photos/julia?utm_source=unsplash&utm_medium=referral& = creditCopyText)

Don't get me wrong. Python's popularity is underpinned by a solid community of computer scientists, data scientists, and AI specialists.

But if you've had a supper with these people, you'll also know how much they're screaming about Python's weaknesses. It's a lot of tediousness, starting with slow speeds, requiring over-testing, and getting run-time errors despite previous tests.

As a result, more and more programmers are using other languages. The top players are Julia, Go and Rust. Julia is great for mathematical and technical tasks, while Go is great for modular programs and Rust is the best choice for system programming.

Data scientists and AI specialists deal with many mathematical issues, and Julia is the winner for them. And even if you look closely, Julia has some advantages that Python can't win.

-Why Python is not a programming language of the future

Python Zen vs. Julia's Greed

People create new programming languages when they have a reason to keep the good features of the old language and fix the bad parts.

For this reason, Guido van Rossum created Python in the late 1980s to improve ABC. ABC is [too perfect] as a programming language (https://homepages.cwi.nl/~steven/abc/). Its inflexible structure made it easy to teach, but it was not suitable for practical use.

In contrast, Python is very practical. You can see it in Zen of Python [^ 1], which reflects the authors' intentions.

Beautiful is better than ugly. It is better to specify than to imply. It's better to be plain than complicated. Still, it's better to be complicated than complicated. The nest should be shallow. It is better to have a gap than to be dense. Easy to read is good. Being special is not a reason to break the rules. However, when it comes to practicality, purity can be lost. ...

[^ 1]: The Japanese translation is quoted here: The Zen of Python

Still, Python continues to carry on ABC's strengths. For example, readability, simplicity, and beginner-friendly points. However, Python is much more robust than ABC and is suitable for practical use.

コンクリートに書かれた文字BCA

ABC paved the way for Python, Python paved the way for Julia Photo by David Ballew on Unsplash

Similarly, Julia's authors want to take over the good parts of other languages and throw away the bad parts. But Julia is far more ambitious. Instead of replacing one language, he wants to beat all languages.

The authors of Julia says:

So we are greedy. That's not enough.

The language we want is like this. First, a loosely licensed open source language. I want the speed of C and the dynamics of Ruby. It's a language like Lisp that has homoiconicity and can use true macros, but like Matlab that is easy to understand and can also describe naturally. Besides, it can be used for general-purpose programming like Python, it can perform statistical analysis as easily as R, it can process strings naturally like Perl, it is strong in linear algebra calculation like Matlab, and it can be programmed as well as shell. Can be spliced together. Plus, it's super easy to remember, but it's also satisfying for brilliant hackers. It can be used interactively and can be compiled.

Julia blends all the benefits that currently exist, but doesn't try to trade them for the shortcomings that exist in other languages. Although Julia is a young language, many of the goals set by the authors have already been achieved.

Why Julia developers like Julia

Versatility

Julia can be used for everything from simple machine learning applications to huge supercomputer simulations. To some extent it can be achieved with Python. However, Python managed to make this a good thing.

In contrast, Julia was created for exactly this. It was. It's from 1.

speed

The authors of Julia wanted to create a language as fast as C, but the result was [even faster](https://theiotmagazine.com/julia-vs-python-will-it- unseat-the-king-of-programming-8220e4cd2e0a). In recent years, Python has become easier to accelerate, but its performance is far from what Julia can do.

In 2017 Julia even joined the Petaflop Club. It's a small club of languages that can exceed the speed of 1 petaflop per second at peak performance. Except for Julia, only C, C ++ and Fortran are currently in the club. ..

-10 tricks to speed up Python code

community

Python has over 30 years of history and has a huge and collaborative community. There are few Python-related questions that can't be answered in a single Google search.

In contrast, the Julia community is very small. This means that it takes more time to look up to find the answer, but you may be involved with the same person over and over again. And this can be an irreplaceable programmer relationship.

Code conversion

You don't even need to know any Julia commands to code in Julia. Not only can you use Python and C code within Julia, but you can even use [Julia within Python](/ run-native-julia-code-with-python-92d3e1079385)!

Needless to say, this makes it extremely easy to fix weaknesses in Python code. In other words, you can stay productive while learning Julia.

投稿用画像

The library is still Python's strength Photo by Susan Yin on Unsplash / library? utm_source = unsplash & utm_medium = referral & utm_content = creditCopyText)

Library

This is one of the best things about Python. It has a huge number of well-maintained libraries. Julia doesn't have many libraries, and users complain that they are (yet) surprisingly unmaintained.

However, given that Julia is a very young language with limited resources, the number of libraries already in existence is quite impressive. Apart from the fact that the amount of Julia's libraries is increasing, Julia can also interface with C and Fortran libraries to process plots.

Coexistence of dynamic and static types

Python is a 100% dynamically typed language. This means that, for example, the program determines at runtime whether the variable is a floating point number or an integer.

While this is very easy for beginners, it can also introduce many bugs. This means that you need to test your Python code in every possible scenario. This is a very ridiculous task that takes a lot of time.

Julia fully supports dynamic typing because the authors of Julia also wanted to make it easy to learn. However, in contrast to Python, static types can be introduced as needed. For example, just like static types in C and Fortran.

This can save a lot of time. Instead of finding an excuse not to test your code (https://medium.com/better-programming/9-excuses-why-programmers-dont-test-their-code-8860a616b1b5), wherever possible You can specify the type.

-Five points Julia has over Python

Data: Invest when you're small

投稿用画像

投稿用画像

The number of questions tagged with Julia (top) and Python (bottom) on StackOverflow (https://insights.stackoverflow.com/trends?tags=python%2Cjulia).

All of this sounds pretty good, but it's important to remember the following: Julia is still smaller than Python.

The number of questions on StackOverflow is one of the pretty good indicators. At the moment, Python tagging is about 20 times more than Julia.

This does not mean that Julia is unpopular. Rather, it's no wonder that it takes time for many programmers to use the new language.

Consider the following. Do you really want to write the whole code in another language? No, maybe you want to try a new language in a future project. That's why there is a time lag between release and use in all programming languages.

But what if you decide to use it now? Julia allows so many language conversions that it's not difficult. Yes, you are investing in the future. By the time more and more people adopt Julia, you will already have enough experience to answer their questions. Also, the more Python code you replace with Julia, the more durable your code will be.

画面上に1と0がたくさんあり、赤いハートを形成している

It's time to show love to Julia Photo by Alexander Sinn on [Unsplash](https://unsplash.com/s/ photos / code? utm_source = unsplash & utm_medium = referral & utm_content = creditCopyText)

Last but not least: Learn Julia and make it your strength

Forty years ago, artificial intelligence was just a niche phenomenon. The industry and investors didn't believe it, and many technologies were unsophisticated and impractical. However, those who learned it at that time are today's giants. Demand is very high and salary is equivalent to an NFL player.

Similarly, Julia is still a very niche. But when Julia grows, the winner will be the one who adopted Julia early.

I'm not saying that if you adopt Julia now, you're guaranteed to make a lot of money within 10 years. But the number of opportunities will increase.

I want you to think about it. Most programmers have Python in their resume. And in the next few years, more Python programmers will be on the job market. But if companies' demand for Python slows, the future of Python programmers will diminish. It's slow at first, but inevitable.

On the other hand, if you can put Julia in your resume, you can have a real advantage. To be honest, how different is it from other Pythonistas? It won't be a big difference. But even three years later, not many Julia programmers will exist.

With Julia skills, not only does it show that you are interested beyond the requirements of your job, but it also shows that you are a motivated person and have a broader understanding of what it means to be a programmer. Become. In other words, you are the right person for the job.

You and the other Julia programmers are the rock stars of the future, and you know it. By the way, the authors of Julia said in 2012:

We recognize that we are greedy beyond excuses, but we still want everything. About two and a half years ago, I started work to create this greedy language. It's not perfect, but it's almost until version 1.0 is released. The resulting language was named Julia. It has already fulfilled 90% of our unreasonable demands, but we have to listen to unreasonable demands from other people in order to make it more complete. So if you're also a greedy, unreasonable and demanding programmer, I'd love Julia to try.

Python is still extraordinarily popular. But if you learn Julia now, it could be a golden ticket in the future. In that sense, "Bye bye Python. Hello Julia! ”

Translation cooperation

Original Author: Rhea Moutafis Original Article: Bye-bye Python. Hello Julia! Thank you for letting us share your knowledge!

This article was published with the cooperation of the following people. Thank you again. Selector: @_masa_u Translator: @_masa_u Auditor: @ r_pg10 Publisher: @_masa_u

We look forward to your opinions and impressions.

How was this article? ・ I wish I had done this, I want you to do more, I think it would be better ・ This kind of place was good We are looking for frank opinions such as. Please feel free to post in the comments section as we will use your feedback to improve the quality of future articles. We also welcome your comments on Twitter. We look forward to your message.

Recommended Posts

Bye bye Python. Hello Julia!
Python starting with Hello world!
Python
[Note] Hello world output with python
cout << "Hello, World! \ N" in python
Python #Hello World for super beginners
[Python] Web application from 0! Hands-on (2) -Hello World-
Python to remember only with hello, worlds
Note for Pyjulia calling Julia from Python
How to display Hello world in python