How Julia Uses Multiple Dispatch to Beat Python

DJ Passey
The Startup
Published in
10 min readJul 21, 2020

--

See for yourself

Photo by Matheus Ferrero on Unsplash

Julia

Julia is a new language. It’s simple to learn, and extremely fast. (Almost as fast as C.) Many people believe that Julia will become a dominant programming language, especially for machine learning and scientific computing.

There is a lot of hype about Julia. Beyond speed, Meta-programming and multiple dispatch are a few of Julia’s useful programming tools that make the language exciting.

But a word of caution. If you learn Julia and then program in other languages you will find yourself thinking: This would be so much simpler in Julia. This happens to me when I code in Python. I love Python, but for certain things, like the effectiveness of multiple dispatch, Julia gives Python a beatdown.

How Multiple Dispatch Beats Python

Photo by Anastase Maragos on Unsplash

What is Multiple Dispatch

Multiple dispatch is a simple concept: Functions can have multiple definitions as long as each definition restricts the types of the arguments differently. It is perhaps one of the best features of the Julia language.

--

--