Julia is not Attempting to be a Functional Language

I think there is a room for all sorts of languages. Languages should have different strengths and weaknesses, otherwise why would we have more than one?

The Designers of Julia specifically chose to not make a functional language because functional languages have not proven themselves well suited for scientific computing and numerics. When doing large matrix operations, mutability is a big advantage. I also suspect that exploratory data analysis is easier with a language designed for mutability. You can mutate large datasets in steps while looking at results.

Although I think Julia has adopted the subset of functional programming which is highly popular and frequently used today:

  • Higher order functions
  • map, fold, reduce, zip etc.
  • Nice syntax for closures
  • Parametric types

It seems not less well equipped in this area than other new languages such as Swift and Kotlin.

Language design is an art. You cannot just throw in as many features as possible. It is about finding the right balance. Scala certainly has a lot of powerful features but that is at the expense of complexity. Julia is meant as a language for scientists and not software developers. Thus simplicity and easy of use are important design goals.

For me personally Scala e.g. is a total turnoff. After spending over 20 years with C++, I’ve become allergic to complexity in programming languages. For a recovering C++ developer, I can’t say Scala was a pretty sight. It seems like a remake of many C++ mistakes: Complexity and slow compilation times. It doesn’t mean people don’t do amazing things with the language. Just that it does not fit my tastes.

It appeals more to me with languages like Kotlin which seems like light versions of Scala, or alternatively Clojure (although an entirely different language).

One of the things I really like about Julia is that the feature set is not that big and the concepts not that complicated. But still with a compact feature set it has tremendous power. Multiple dispatch combined with LISP like macros gives a lot of power and flexiblity.

Creating DSLs is quite easy in Julia e.g. It also has a lot of flexibility in where it is executed. Have you looked at the examples of running Julia code on the GPU e.g?

Geek dad, living in Oslo, Norway with passion for UX, Julia programming, science, teaching, reading and writing.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store