The Functional Style

The functional style of programming has been around for a very long time, although it hasn’t been the mainstream. In recent years, it’s been gaining in popularity. Let’s first look at what it is, and then why that’s significant.

What’s the Functional Style?

“Computers are stupid; you have to tell them every detail,” were the words of my teenager learning to program. Sadly, feeling that pain every single day is the job of most professional programmers. Anything that can alleviate those troubles is a step in the right direction. Functional programming is one such solution.

In the imperative style of programming, we have to key in every step. Create a variable named i, set the initial value to 0, check if the value is less than ...

Get Programming Kotlin now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.