Press "Enter" to skip to content

What programming language should I learn – 2

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.

Clojure

What programming language should I learn?
Clojure Logo

Clojure is a dialect of Lisp.  According to Wikipedia it does not only run on JVM but also, Common Language Run Time, and JavaScript engines. Lisps, as well as, Clojure, treat code as data. Clojure seem very interesting and it is fairly new (appeared 2008).

Scala

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.

What programming language should I learn 2016?
Scala Logo

Non-JVM alternatives

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

Haskell
Haskell Logo

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

Is Erlang the next language I should learn?
Erlang

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

What Language should I learn next year?
Elixir Programming Language

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

Another suggestion was TypeScript. However, TypeScript seems to be OO (it is based on JavaScript). Using JavaScript it is possible write Node.js applications. The Node.js apps can in turn be run as desktop applications. One very interesting aspect is that these applications can interact with Arduino devices. I might re-consider TypeScript and learn it in 2017 or 2018. I also considered Ruby which seems to be a fairly popular language.

So what language will I learn 2016?

Functional Programming is what I am going to Learn next year
Programming Elixir

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.  I have read one book from Pragmatic Press (i.e., The Pragmatic Programmer), and I enjoyed it. Hopefully, all books from the same publisher are of  similar qualities.

Install  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.

Ubuntu 14.04


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

Windows

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!

Be First to Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: