I recently asked which programming language I should learn next year (i.e., 2016). In this post I will evaluate the alternatives that I have by asking the question in different places around the internet. The post will end with the choice I made and how to install the language
To summarize my earlier post, I mainly use programming for creating Psychology experiments and, thus, need a powerful language. Furthermore, in Psychological experiments stimuli are typically being presented (e.g., sounds, images, text, or video). Responses need to be collected from the keyboard, mouse and specially built equipment (e.g., via USB; Arduino). For some experiments timing of the presentation and collection of responses might be significant. The language should, of course, be free, open source, and work on a computer running Windows, Linux, and OS-X. However, mobile platforms such as Smartphones and Tablets might also be interesting in the future. Note that all languages considered are more or less general purpose languages and might, therefore, be attractive to anyone that want to extend their stack and learn a new programming language 2016.
One of the most valuable answers I got was that I should look for a functional language.
Why a functional language?
Why? Well, the argument seem to be that you become a better programmer if you leave your comfort zone. Doing most of my programming in Python, which is an Object-oriented language (OO). It will most likely make programming harder or, at least, make you think differently concerning programming problems. Some say that if you are new to functional programming, then a functional language will get you think in ways you’ve never thought before. As a result your programming in other areas and other languages will improve.
Therefore, I decided to learn a functional language. Why choosing a functional language? Well, I learn more when I am challenged. All of the languages I consider seem to be general-purpose, concurrent, and fast. I will first describe 2 languages that can be compiled to Java bytecode. Of the remaining three two of them are run on the Erlang Virtual Machine (one being Erlang).
Java Virtual Machine
The first two he suggested are Java Virtual Machine (JVM) languages; Scala and Clojure. These two languages are fast. Scala offers both OO and functional programming whereas Clojure is more purely functional.
Scala (acronym for “Scalable Language”) was designed to be a better programming language (not only a better Java). It has support for both functional and object-oriented programming. Scala and Java code can be mixed which make it possible to incorporate you earlier Java code (if you have any, that is). It appeared in 2004 and was designed to be concise. Scala has a rumour to be a hard language to learn.
I also considered three more languages that cannot be categorized as JVM languages; Erlang, Elixir, and Haskell. Erlang and Elixir are not as fast as Scala and Clojure. Haskell is the most pure functional language.
Haskell is the only one of the languages on my list hat is considered as a pure functional programming language. It was created in 1990.
Erlang was created by Ericsson in 1986. According to Wikipedia Erlang is almost a functional language (not entirely sure what this mean though). It has, for instance been used, for telecoms, banking, e-commerce, computer telephony and instant messaging. For example, the servers of the instant messaging application WhatsApp servers run on Erlang.
Elixir is a dynamical and functional, programming language. In contrary to the JVM languages Elixir runs on the Erlang virtual machine (BEAM). Elixir is extending Erlang and is supporting metaprogramming and polymorphisms. Elixir was created 2012 and is “related” to Clojure. Elixir seems to be a fast language and good for concurrent programming. Importantly, Elixir seem to suggest that it is a good language to start learning functional programming.
Other languages to consider
So what language will I learn 2016?
First I thought it was pretty clear; Elixir is the newest language, and I should learn it. However, I after reading more on the more modern languages (e.g., Clojure, Scala, and Elixir) I started to like all of them. Scala being hard to learn makes it attractive. Why did I choose Elixir? It is the youngest of all languages considered, and some think it is an excellent starting point for learning functional programming. Elixir is based on Erlang and is adding a lot of features to it (I don’t see any point to learn Erlang then).
I will start my journey to learn Elixir by reading Programming Elixir
So far I have only installed Elixir on my computer running Ubuntu 14.04 but I will provide installation instructions for Windows as well.
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb && sudo dpkg -i erlang-solutions_1.0_all.deb sudo apt-get install esl-erlang elixir
Just download the installer and click on it.
Please come back for updates on resources for learning Elixir and other languages that I might decide on to learn. My next step is to find a good IDE for Elixir. I do think that it would be best to find an IDE that can deal with both Python and Elixir (note, I do not like Eclipse!). If you happen to know a good IDE, please let me know!