O'Reilly logo

Swift 3 Functional Programming by Dr. Fatih Nayebi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 10. The Best of Both Worlds – Combining FP Paradigms with OOP

 

"Objects are closures with multiple methods, closures are objects with a single method. So yes [OOP and FP can be used together.]"

 
 --Erik Meijer

In previous chapters, we talked about functional programming (FP) most of the time. You learned various techniques and paradigms of FP. In contrast, we barely touched on object-oriented programming (OOP). Mostly, we talked about the disadvantages of imperative programming. In practice, most of us have to work on applications that are designed by OOP principles. The reality is that even if we do not like OOP, we are stuck with it. For instance, in iOS and macOS development, we have to deal with Cocoa and Cocoa Touch frameworks that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required