Friday, May 20, 2011

Darwinian evolution of programming languages

In evolutionary biology, when the environment changes, the flora and fauna changes, this is done by adapting to the change and fitting the specie to the new constraints and new opportunities. This is the essence of Darwin's The Origin of Species - the survival of the fittest.

Same thing happened in programming languages.

During the early days, computation power and memory were scarce and expensive, thus programming languages in use were as close to the machine as possible, to exploit everything from these resources - think of LISP's car and cdr, which are based on specific registers...

After some time, memory was still expensive, but computation power become more available, therefore a new specie evolved - a language that allows to describe the computations done in a more "human" way (i.e., imperative), but still close monitoring of the memory is available. Think of C.

Computation power kept growing, and new programming paradigm evolved - OO, but still, memory is costly, and there was C++.

During the 90's memory became cheap, tight monitoring of it became unnecessary and more could be done with it. The stage was ready for the next languages to rule the Earth, and the era of virtual machines started - most notably Java and its JVM, but around that time also Python, Ruby and others appeared.

Computation power kept becoming more available, as well as memory. But times have changed. Multi-core processors are here, and are here to stay. More power now means more processors, not a stronger, single processor. New languages are now coming out of the primal ocean and taking their first breaths of fresh air (or doing parallel computations). These languages are the functional languages. They were around before, but just like the dolphins that returned to the ocean with enhanced brains and lungs to rule that habitat, It is now their turn to gain dominance.
It is not clear who will win this new race. Some of these languages have the advantage of being able to interact and co-exist with already running software and libraries - such as Clojure with the JVM, or F# with .Net.

Days will tell who will inherit the planet - exciting times ahead.

No comments: