This site will look much better in a browser that supports web standards, but is accessible to any browser or Internet device.
Higher Order Perl
Mark Jason Dominus
Morgan Kaufmann, 2005
The simplest thing you can say about MJD's Higher Order Perl, is that it is not your ordinary, everyday programming book. It is not even your everyday Perl programming book. MJD introduces an approach to programming that will be new to most programmers. Even those who have some experience with these techniques will probably gain some insights and tricks.
Many of the techniques introduced in this book will be familiar to users of Lisp or Lisp-derived programming languages. If you haven't worked with one of these languages before, be prepared for an eye-opening approach to Perl and programming in general. If you have worked with one of those languages, you may be surprised to see the techniques that Perl supports.
The book begins with functional programming and recursion. This section gives the grounding you will need to understand the rest of the book. MJD goes on to explain programming with dispatch tables. Although I have been using dispatch tables for years, MJD still showed a couple of techniques that I haven't used. Next came caching, including memoization, and how caching can solve some problems with recursion. The book continues with iterators, streams, currying, parsing, and a large example of declarative programming.
MJD's style is clear and understandable. He gave the best explanation of currying, I've ever seen. He succeeds in showing how these techniques work and how you might use them to improve your own code. Possibly one of the most important points of the book is to show a different approach to solving problems with Perl. As he says in the Preface, many Perl programmers have been writing C programs in Perl for years. Part of the purpose of this book is to point out that there are other ways to solve programming problems. The more ways you have of looking at problems and solutions, the better your chance of solving the next problem.
My only complaint about the book was the long example used for declarative programming. Although this example tied together many of the techniques in the book, it did seem to drag for me. The example showed a declarative solution to a rather complex problem. As a result, it was easy to get lost in the details of implementation and lose sight of the principle being taught.
Overall, I would recommend this book highly to any intermediate or advanced Perl programmer. I am not a certain about recommending the book to a beginning Perl programmer, unless that person already has a background in multiple programming paradigms, including functional programming.
Posted by GWade at July 24, 2006 07:06 AM. Email comments