Introduction

 

One major goal in software development is to write bug-free code. Although this has been a goal since day one, there haven’t been many (successful) practices and procedures that can enable programmers to achieve this in any sense.

Functional programming seeks to correct that. Around since the 1970s, although not mainstream, functional programming is built around the same tenets as calculus. One of those ideas is that the work that needs to be done can be decomposed into functions and, most importantly, those functions will not have side effects. This leads to more confidence and easier testing.

Java was designed as an object-oriented programming language, but there are other languages that run in the JVM. One of the more recent ones, and one that is being adopted at a great rate, is Kotlin. Kotlin seeks to provide functional language capabilities in the JVM, with a syntax that is familiar to Java developers (especially those up on new Java 8 constructs).

This minibook seeks to give the reader a useful introduction and overview of functional programming and its implementation in Kotlin. It provides a compendium of chapters from some of Manning’s excellent books. There are more resources in Manning’s library, such as some on more hard-core functional programming languages like Erlang, but this minibook, and the books it pulls from, can give Java developers and others a solid leg up on “going functional.” I hope you enjoy it.