A Humble Guide to Functional Programming

In this series of articles, we will be covering almost all aspects of Functional Programming from scratch.

Along the recent years, I have delivered trainings on software development to dozens of enterprises and hundreds of attendees; and one of the biggest issues I’ve witnessed is the slow adaptation to the new technologies and concepts. For instance, as of the end of 2016, only at most 5% of the companies that I have given trainings that use Java have switched using version 8 (which supports basic functional concepts), despite it’s been 2.5 years since it’s first stable release. We can conclude that particularly for the enterprises, technology adaptation is way more slower than it should be.

These article series will be written in the light of the experiences that I had while teaching functional concepts to the people mostly coming from OO world. Thus we will try to make it easier to grasp the concepts in this manner.

Functional programming is a highly important concept that we better learn or at least be aware of, it’s highly likely will be here along the coming years.

Making sense of and setting up the reasoning behind should always be the first step before learning anything. That’s why we will be starting with the reasons might make us want to use functional programming and a little bit of history. We will answer the question, “Why functional programming, and why now ?” and you may be surprised but the answer is not “because it’s popular”.

Then we will start covering the basics using the latest features of Java8, lambda expressions being the most important one. Why Java8? Cause most of us probably already familiar with the basics of either Java or a similar language like C++, C# or even Python. You better know that it’s not required to know Java, any OO language will work. Or you may already be familiar with some Functional Programming concepts if you know one of other languages we’ve mentioned or some modern ones like Go or Groovy. Thus we will not be covering Java deeply; our focus will be on functional programming and the features related to it in Java8.

After that, we will make a gentle introduction to Scala, making comparisons with the features we already know or learned in the Java 8 section. Why the comparison? Because as humans, we tend to learn new concepts much faster if we can compare them with the ones we already know. Why Scala? Well, because it fully supports both OO and Functional concepts, runs on JVM and can integrate with Java, it enables you to switch to Functional side more smoothly than other options. Its syntax is not that radically different than well-known OO languages like Java, C++, C# or Python, compared to other “purer” Functional alternatives like Lisp, Clojure or Haskell.

Last but not least, we will be touching some advanced concepts on functional programming like Higher Order Functions, Monads and Parallelism with Scala, building our knowledge on top of others we’ve learned in the previous articles.

Thus, our course on Functional Programming will include the following articles:

  • Making Sense of Functional Programming: “Why Now” ?
  • A Gentle Introduction to Functional Programming with Java8
  • A Gentle Transition to Scala for Java(8) Programmers
  • Functional Programming with Scala
  • Advanced Concepts in Functional Programming with Scala

What’s next?

Based on your feedback, we may continue to our journey on functional programming with other “purer” functional languages, Clojure being the most probable candidate.

Also after these series of articles, there will be a Big Data/Data Science track in which we will be covering Big Data concepts, applications and Data Science basics using Apache Spark with Scala (and maybe Python sometimes). With these articles, you will be able to use your knowledge in a practical and highly demanded area.

I highly encourage you to subscribe to our newsletter on Koders (http://koders.co), both to follow these series and other high-quality articles and content on latest technologies. Also feel free to reach me via Twitter and Linkedin, your feedbacks are invaluable for us.

So stay tuned! Hope to meet you again with the next article.


Please enter your comment!
Please enter your name here