Summary
Go is designed using good ideas from both FP and OOP world. For example, go borrowed interfaces, duck typing, and composition over inheritance from OOP world and functions as first class citizens from the FP world.
Go is a perfect example of being pragmatic. Go took the better principles from both OOP and FP paradigms, while clearly ignoring many ideas from each. Perhaps, this perfectly balanced design is what makes Go so special? In that way, Go is the perfect ratio of software languages.
Note
See Chapter 11, Category Theory That Applies, for a discussion about the golden ration.
In the next chapter, we'll delve more deeply into pure functional programming. We'll see how to leverage category theory and class types to abstract away details in order to glean new insights. We'll look at functors along with slightly stronger and more useful versions of functors called applicative functors. You'll also learn how to bring the world of side-effects under control using Monads and Monoids.