Book review: “Higher Order Perl” by Mark Jason Dominus

August 7th, 2006 at 8:21 am

In “Higher Order Perl” (or HOP as it’s affectionately called in the Perl community), the renown Perl wizard Mark Jason Dominus (MJD) shows how to take Perl coding to the next level by applying advanced programming techniques from the domain of functional programming.

The book covers recursion (including methods to convert recursive code to iterative code), iterators, streams, memoization, currying, parsing, constraint programming and higher order functions (functions that take functions as arguments and/or return other functions). It is packed with great, sophisticated code which is explained very well and is a model for correct programming. The author takes an approach similar to Peter Norvig’s PAIP - advanced coding techniques are presented, and then non-trivial programs are written to demonstrate these concepts.

The comparison with Lisp here is unavoidable, and MJD talks about Lisp in his preface. He claims that Perl shares 6 of the “7 features unique to Lisp” quoted from Norvig’s PAIP, and that this basically means that most of what can be written in Lisp can be written in Perl in roughly the same manner. But as he himself admits in a later interview, the 7th “missing feature” of Lisp, namely its uniform syntax, is what *really* differentiates Lisp from the rest. Lisp’s syntax allows a very clean handling of higher-order functions, list-processing, and most importantly macros. The contrast between MJD’s own code in HOP and Norvig’s PAIP code is the best example for this fundamental difference. Be MJD’s code as clean and nice as it is (for Perl, anyway), it is nowhere near the sheer aesthetic appeal of Norvig’s Lisp.

Still, Lisp is Lisp and Perl is Perl, and each has its respectable place in the world of programming. HOP is a great book to read, and I warmly recommend it to any intermediate+ Perl programmer. For people who have never programmed in Lisp or have never learned functional programming techniques, this book is a must - it will literally take your code to a higher level. For diehard fans of Lisp, this book demonstrates how to employ most of your favorite techniques in the most practical language out there (though the Perlish syntactic sugar will at times make your teeth grind).

Related posts:

  1. Book review: “Perl Medic” by Peter J. Scott
  2. Book review: “Effective Perl” by J.N. Hall and R. Schwartz
  3. “TPJ’s Computer Science & Perl Programming” ed. Jon Orwant
  4. Book review: “Mastering algorithms with Perl”
  5. Book review: “Perl 6 and Parrot essentials, 2nd edition”

Leave a Reply

To post code with preserved formatting, enclose it in `backticks` (even multiple lines)


generic acomplia purchase cialis overnight delivery cheap acomplia online buy generic clomid buy cialis low price viagra without prescription where to buy cialis lowest price levitra where to buy propecia cheap cialis from canada lasix no prescription viagra without rx cheap accutane tablets viagra online without prescription viagra no rx buying cialis online zithromax viagra in uk free cialis cialis us where to buy acomplia find cialis online buy viagra lowest price accutane prescription buy cheap accutane online cialis buy buy generic cialis online acomplia order propecia online lowest price synthroid synthroid without a prescription synthroid online buy propecia online cheap levitra online where to buy levitra cialis online review synthroid prices cialis generic cialis buy drug buy viagra on line viagra pharmacy cialis for order price of levitra zithromax online where to buy synthroid soma generic generic clomid propecia online stores viagra cheap drug cheap generic soma cialis cheap zithromax online cheap order accutane online purchase zithromax online purchase viagra online buy cheap clomid cheap generic propecia zithromax pharmacy online pharmacy cialis cheapest acomplia cost of cialis no prescription viagra free viagra purchase lasix online cialis from india viagra from india order discount cialis soma online stores find no rx cialis cialis no rx required find viagra without prescription approved cialis pharmacy lasix discount