Chapter 3Scala and Functional Style

by Venkat Subramaniam

When designing Scala, Martin Odersky took the bold, unconventional step of bringing together two different paradigms: the object-oriented and the functional. This is no trivial undertaking: these two styles are quite dissimilar, and this marriage of distinct paradigms poses some real challenges.

To see what Odersky was up against, let’s first take a look at what it means to be functional. There are two defining aspects to the functional style of programming: the purity of functions, and programming with higher-order functions.

Get Functional Programming: A PragPub Anthology 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.