Functional Languages Flourish on the Java Virtual Machine (JVM)

The Java Virtual Machine (JVM) started out with the express goal of allowing Java programs to be written once but run on different computers. In addition to that capability, the JVM has matured to become a powerful platform for functional programming languages such as Scala and Clojure that are providing the major solution building blocks for the Digital Economy.

1-1-2.jpg 

Java programs execute within the confines of an abstract (virtual) computing machine that is based on a well-defined specification.  This virtual computing environment is called the Java Virtual Machine (JVM).  

Java programs are converted to an intermediate bytecode, which is the instruction set of the JVM.  That bytecode is the actual program executed on the JVM.  The JVM was initially created solely for Java with the goal to “Write Once, Run Anywhere.” 

Indeed Java programs now run on Linux, Windows and Mac OS, thanks to the JVM. A surprisingly pleasant feature of the JVM was that it is able to support any language that compiles to JVM-compatible bytecode.  More importantly, any code that runs on the JVM has access to the code written in another JVM-compatible language.  This has allowed a large number of programming languages to come into being that are run on the JVM, many of them functional. 

The first stable JVM release came out in January of 1996 from Sun Microsystems as JDK 1.0.2.  Since then it has grown, matured, and stabilized into a platform unto itself. It has proven to be robust and resilient.  The power of the JVM was proven with releases in 2001 of Jython and JRuby, respective implementations of the Python and Ruby programming languages on the JVM.  Functional languages soon appeared on the JVM. Scala, released in 2003, was one of the first.  Clojure followed in 2007. 

Functional languages have recently grabbed the spotlight because they are being used to create the newest and most complicated Big Data components such as Spark, Storm, and Kafka. In addition, companies that lie at the heart of the Digital Economy have bet their businesses on these functional languages.  The Twitter platform runs on Scala.  Spotify uses Scala data pipelines for music recommendations.  Gilt uses Scala and the Play framework for their online presence. Akamai uses Clojure for content delivery.  NetFlix uses Scala and Clojure. 

Functional language capabilities have created such a demand that the Java language specifications have had to adopt. The latest version of Java now supports more functional capabilities including lambda expressions and functional interfaces, parallel collections and operations, as well as virtual extension methods and method references. The JVM is enabling the swift maturity of functional languages, which in turn are feeding back into Java.  It is a symbiotic relationship that has provided untold benefits. 

The Digital Economy transformation is necessitating accelerated development through all stages of the application and platform lifecycle.  Functional languages are facilitating that rapid development pace.  At the same time, functional languages themselves are evolving at an astonishing rate to provide the capabilities that are in such demand. And because of the JVM, functional languages have a well-defined, formal execution platform that provides the fertile soil on which they have taken root.

By Dharmendra Kapadia on Jun 18, 2015 2:44:51 AM

Dharmendra is Senior Director, Solutioning and is based in Ness US

0 Comments

Sign up for our Newsletter