Programming in Julia – First impressions

Programming languages have been evolving for over seventy years, but the last 40 years have focused heavily on languages based on the C lineage. The new languages we have seen born in the past 3-4 years have started to move away from the C-like syntax, and take on characteristics of languages past. Julia is one such language. One of Python’s strengths is fast prototyping, and an extensive cadre of libraries. However it suffers from being a slow dynamic language, and the requirement of having to re-write the code in a faster static language such as C or C++ when a “final” product is needed – something commonly known as the “two-language” problem.

The programming language Julia offers a solution to this: expedient building in a fast dynamic language.


Recently I spent a day trying to get a better handle on programming in Julia. There are a bunch of opinions on various blogs relating to experiences with Julia, mostly good. Julia has many good qualities, foremost of which is that it seems to be a very well designed language, with usability one of the guiding principles. It is primarily suppose to act as a scientific language, as a potential replacement for the likes of Python, and Fortran, and likely a low cost alternative to Matlab.

Julia, named after French mathematician Gaston Julia, the inventor of fractals, was publicly released in 2012. It was developed by Stefan Karpinski, Jeff Bezanson, Viral Shah, and Alan Edelman at MIT. The objective was to create a language by encompassing the positive attributes of numerous languages: Python (simplicity and dynamism), R (statistical processing), C (execution speed), Perl (string processing), and Matlab (linear algebra). Julia is by no means a small language. It has a whole lot of functionality, mostly in the form of data structures, such as arrays and stacks, and their associated functionality. In that respect it is less of a traditional language with a low form factor, such as C. But it makes up for it in the extensive functionality.

I use Julia mainly for image processing, so the gripes I have with: C (use of dynamic arrays for large images, and lack of libraries); Python (syntax, and slowness), and MATLAB ($$$, proprietary nature), just don’t exist with Julia. It is seemingly fast, and doesn’t have a coronary when I give it a large array to process in a nested loop. It allows me to specify types if I need to, but doesn’t make me have to figure out which is the best types for the data. In some forthcoming posts, I will outline some of the features of Julia as they relate to common programming constructs, and look at a few language comparisons with respect to performance.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s