Why Functional Programming?

What is Functional Programming?

Functional Programming, or FP, is nothing new. Built on solid mathematical fundamentals, it encourages a style of programming which eliminates many types of bugs and common challenges that the more common imperative and object oriented (OO) styles of coding often lead to.

Is Functional Programming hard to learn?

Absolutely not! Whilst FP has its roots in mathetmatics, it is used on a regular basis in real-world systems all over the world, from line of business applications to data-intensive analytics platforms. In short, virtually anything that your teams may be developing today in the OO style can be achieved in the FP style as well. Many developers are already using FP patterns today without realising it; FP is quick to learn, and the key fundamentals can be picked up within a few days' of applied effort.

It's also worth observing that many popular programming languages today used in the enterprise such as Java and C# are leaning more towards offering FP features as the industry acknowledges the fact that FP is an effective and powerful solution to many real-world problems, particularly those involving writing scalable systems.

See our training section for guidance on how you can start exploring the world of FP today.

We recommend F#

At Compositional IT, we're big fans of FP, and in particular F#, a functional-first programming language that runs on the Microsoft .NET platform. We prescribe the use of F# as a general purpose programming language for several reasons.

  • Powerful. F# allows us to model systems and business logic much more effectively than in many other programming languages. Bug rates in for systems written in F# are generally extremely low, meaning that overall costs for development are much lower than you might be used to.
  • Quick to develop in. F#'s unique syntax and features allow you to rapidly prototype in it, and then move over to a full production application with the minimum of effort.
  • Runs on .NET. F# has the full backing of the Microsoft .NET framework, with a rich ecosystem of libraries and tools that can be used immediately with F#.
  • Data analysis. F#'s unparalleled data manipulation capabilities mean you can use it in a wide variety of situations when working with data, from exploration to "big-data" style analytics.
  • Pragmatic. Encourages developing systems written in the FP style, but also allows the use of imperative programming if required.
  • Cloud ready. F# has many excellent libraries for working with cloud systems such as Microsoft Azure or Amazon Web Services, as well as a number of excellent general purpose distributed programming frameworks.