| Functional Programming In Java |
|
Author: Pierre-Yves Saumont Functional programming is increasingly popular and Java is popular so a book on both topics is a good idea. I'm not a functional programming user, but I am interested in the approach. I find some of the ideas of functional programming persuasive, but so far I haven't been converted hook, line and sinker. I'm like the majority of programmers - I use some aspects of functional programming when I think it results in simpler code. But functional programming in Java is not something I've considered before, hence my interest in this book. The first chapter explains what functional programming is all about. It isn't overly academic and discusses the advantages of no-side effect functions and concepts such as immutability briefly. You won't find a reference to monads or category theory here, it's all practical - although monads do get an appendix all to themselves. Chapter 2 moves on to consider functions in Java and this is the first place you start to get a feel for what is wrong with this book - it's Java. It is not a good choice for a functional approach. This is where the author begins his fight against Java to implement functional approaches to solving problems. Chapters 3 and 4 are about alternatives to iteration. Chapter 3 explains functional ways of applying functions to data so that the iteration is hidden and chapter 4 is about recursion. Of course Java doesn't support tail recursion so you have to struggle against it yet again. Chapter 5 picks up the data driven programming elements again with a look at Lists with Lisp just below the surface. Chapter 6 is an examination of the null problem and how not to use it to signify optional data. Chapter 7 is about exceptions and error handling, which is about the most difficult problem functional programming has to solve. Errors by their very nature break the neat perfect flow of functional composition with no side effects - errors are side effects you can't avoid but would like to. At this point the book starts to consider more advanced topics.Chapter 8 is about advanced list handling including parallel processing. Chapter 9 is about the role of laziness in functional programming. That's lazy evaluation, not sloth on behalf of the programmer. Chapter 10 deals with trees, another perfectly recursive data structure. This goes further than you might expect and included balanced trees. The next chapter gives examples of how you can solve real problems with trees. The remaining chapters are about practical problems - state mutation, input/output, sharing state and solving common problems.
|
Code: The Hidden Language of Computer Hardware and Software 2nd Ed Top Book 2023 |
C++ Programming, 7th Ed (In Easy Steps) Author: Mike McGrath This is the 7th edition of a slim book on C++. Can you really learn C++ in easy steps? |
| More Reviews |

