TDD and Functional Programming – A Perfect Match

"Any sufficiently advanced technology is indistinguishable from magic."
– Arthur C. Clarke

All of the code examples that we have seen so far in this book follow a particular programming paradigm: object-oriented programming (OOP). This paradigm has monopolized the software industry for a long time and the majority of software companies have adopted OOP as the standard way of programming.

However the fact that OOP has become the most used paradigm does not mean it is the only one that exists. In fact, there are more that are worth mentioning, but this chapter is going to focus only on one of them: functional programming. Additionally, this book's language is Java, so all code snippets and examples will be based on the functional API that were included in version 8 of Java.

Topics covered in this chapter include:

  • Optional class
  • Functions revisited
  • Streams
  • Applying TDD to functional programming
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.37.12