What Is Julia?
Julia is a high-level, dynamic programming language built for numerical and scientific computing. It was started in 2009 at MIT by Jeff Bezanson, Stefan Karpinski, Viral B. Shah, and Alan Edelman, announced in 2012, and reached version 1.0 in 2018.
temperatures = [21.5, 23.0, 19.8, 25.1]
for t in temperatures
if t > 20
println(t, " °C is warm")
end
end
println("Average: ", sum(temperatures) / length(temperatures))
21.5 °C is warm
23.0 °C is warm
25.1 °C is warm
Average: 22.35
Its creators wanted one language that was as easy as Python, as good at math as MATLAB, as good at statistics as R, and as fast as C. The defining traits:
- Fast — Julia compiles each function to native machine code the first time you call it (just-in-time compilation via LLVM). Well- written Julia runs within a small factor of C.
- Dynamic — you don't have to declare types; there's an interactive prompt (the REPL), and code feels like a scripting language.
- Multiple dispatch — a function can have many methods, and Julia picks one based on the types of all its arguments. This is the central idea of the language, and you'll meet it properly in Level 2.
- Made for math — arrays, matrices, linear algebra, complex numbers,
rational numbers, and arbitrary-precision numbers are built in, and
code can use Unicode symbols like
π,√, andα. - Open source — MIT-licensed, with a package ecosystem of over 10,000 registered packages.
This course teaches Julia 1.13 (the examples were run on Julia 1.13.1). Everything in Level 1 also works on any Julia 1.x release.