Functional Programming hits the Big Time

functional-progNo longer the stuff of more esoteric applications, functional programming is beginning to see increased usage across the software development world. At its essence, functional programming tells software explicitly what to do, instead of procedural programming’s focus on how to do it. As revealed in its name, it is a stateless paradigm with more similarities to mathematical functions than a massive object-oriented application.

Let’s take a high level overview of functional programming to see if it makes sense as part of your development team’s toolbox. Perhaps it triggers some insights to solve a pressing problem in your current software engineering efforts?

So what is Functional Programming?

The changing business world and its focus on interactive apps able to scale massively are outgrowing state-driven software. This fact is highlighted in a recent article by Forrester Research published in ZDNet providing a look at functional programming and its increased relevance to the programming community. The article notes FP requires a different mindset and approach compared to traditional programming languages.

A recent study reported that over half of all surveyed developers work for a company now using functional programming in some fashion. Forrester compares this migration to the emergence of object-oriented programming in the 90s. OOP served to transcend the limitations of procedural programming back then, and FP is poised to do the same thing to OO software today.

In addition to its overall brevity compared to object-oriented code, functional programming offers other advantages over older programming styles. It reduces regression errors in code, supports greater reuse, and also makes both the creation and maintenance of software an easier process. As noted earlier, applications written with a focus on the functional paradigm are able to massively scale better than OO software.

That latter point is especially important in a business marketplace increasingly dependent on eCommerce and social media.

Functional Programming Languages

While there is a host of functional programming languages considered to be “pure,” many of these are included as part of mathematical software. Thankfully, nearly all popular languages support the use of functional programming constructs embedded within any codebase. As such, programmers and architects need to be conscious of thinking in a functional mindset when designing and writing applications.

A hybrid language like Scala (or even F# for Microsoft shops) serves a bridge for introducing more functional concepts into a team’s “regular” programming style. Even old school examples like PHP or JavaScript are able to work as a functional programming language. Simply understanding how functions work within any language helps bootstrap this new mindset.

While Forrester provides the full functional programming report referenced in the ZDNet article, it requires a subscription to their research service. If your company already subscribes, congratulations and a download are in order. The research report is also available for non-subscriber purchase for $499.

Thankfully, there are other free resources available for learning about functional programming. The UK-based developer, Mary Rose Cook has a detailed blog post on the topic. Smashing Magazine also provides a useful introductory article.

Simply put, learning about functional programming is a wise choice for any software professional. Expect to encounter its use in your career soon, if you aren’t already using it today.

As always, thanks for reading this edition of the Betica Blog. Come back soon for additional insights on the programming world.