O'Reilly logo

Swift Functional Programming - Second Edition 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

Best of Both Worlds and 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 mostly about Functional Programming (FP). We 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 ...

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