Explosion of functional programming: part 2

[Edited August 24, 2012: Corrected procedural language example. Thanks to Bill Nye for identifying a mistake in the previous version]

Functional programming languages are gaining significant traction in industry for building web applications. Functional programming languages coexist with existing procedural and logic language paradigms. To review programming language paradigms:

Procedural language:

Logic language:

Functional language:

The allure of a functional or logic language is its expressiveness for developers and extensibility for multi-processor computing. Developers write few lines of code in functional and logic languages to express the same concept as in a procedural language, for example, selecting items from a list (above). Functional and declarative languages only specify the result to obtain, not the steps to obtain the result as in a procedural language. The compiler decides how to use multiple processors, threads, and computer servers to complete the computation.

New web frameworks have been created for functional languages in the past decade. Here are some examples. Running on the JVM, Groovy is a variation on Java with function language features such as closures and Scala makes the functional paradigm primary. Scripting languages such as Python (own runtime & JVM option), Coffeescript (compiles to Javascript), and Ruby (own runtime & JVM option) incorporate functional language features. Popular web application frameworks run on these functional languages. Groovy has Grails, Scala has Lift and Play, Python has Django, and Ruby has Rails.

As it currently stands, functional languages are flourishing in web frameworks, which is the middle- or back-end tier of a website. The front-end tier, which does not assume or need multi-processor computing, remains exclusively a procedural paradigm as this time. JavaScript, Flash’s ActionScript (JavaScript variant), Java applets, and improbably Silverlight are used for front-end programming.