Higher-Order Perl: Transforming Programs with Programs (英語) ペーパーバック – 2005/3/14
Kindle 端末は必要ありません。無料 Kindle アプリのいずれかをダウンロードすると、スマートフォン、タブレットPCで Kindle 本をお読みいただけます。
Most Perl programmers were originally trained as C and Unix programmers, so the Perl programs that they write bear a strong resemblance to C programs. However, Perl incorporates many features that have their roots in other languages such as Lisp. These advanced features are not well understood and are rarely used by most Perl programmers, but they are very powerful. They can automate tasks in everyday programming that are difficult to solve in any other way. One of the most powerful of these techniques is writing functions that manufacture or modify other functions. For example, instead of writing ten similar functions, a programmer can write a general pattern or framework that can then create the functions as needed according to the pattern. For several years Mark Jason Dominus has worked to apply functional programming techniques to Perl. Now Mark brings these flexible programming methods that he has successfully taught in numerous tutorials and training sessions to a wider audience.
* Introduces powerful programming methodsnew to most Perl programmersthat were previously the domain of computer scientists
* Gradually builds up confidence by describing techniques of progressive sophistication
* Shows how to improve everyday programs and includes numerous engaging code examples to illustrate the methods
“It's well written…everyone who claims to be an expert ought to read it…these techniques allow programmers to accomplish far more than they're used to." Gregory V. Wilson, Dr. Dobb's Journal, November 2005 "It is, quite simply, one of the best books on programming I have read for a long time."Martin Schweitzer, Computing Reviews, Association for Computing Machinery, July 2005 "Mark Jason Dominus has hit his mark with Higher Order Perl. It is a very informative book that is a must read for Perl programmers who want to take their skills to the next level. Mark Rutz, Linux Journal, November 2005
“Higher-Order Perl is one of the Perl books that should have a place on the bookshelf of every Perl programmer. It offers an in-depth understanding of important programming techniques and fundamental concepts. The chapter on parsing alone is worth the price of this book. I do not know a better text about parsing in Perl. Reinhard Voglmaier, Unix Review, November 2005
“Higher-Order Perl is the most exciting, most clearly-written, most comprehensive, and most forward-looking programming book I've read in at least ten years. It's your map to the future of programming in any language." Sean M. Burke, Leading Programmer, Comprehensive Perl Archive Network (CPAN) "There are lots of book that teach you new Perl modules or techniques. This book goes beyond that and teaches a new way to think about Perl programming. Peter Norvig, Google Inc.
“As a programmer, your bookshelf is probably overflowing with books that did nothing to change the way you program. . . or think about programming. You're going to need a completely different shelf for this book. While discussing caching techniques in Chapter 3, Mark Jason Dominus points out how a large enough increase in power can change the fundamental way you think about a technology. And that's precisely what this entire book does for Perl. It raids the deepest vaults and highest towers of Computer Science, and transforms the many arcane treasures it finds--recursion, iterators, filters, memoization, partitioning, numerical methods, higher-order functions, currying, cutsorting, grammar-based parsing, lazy evaluation, and constraint programming--into powerful and practical tools for real-world programming tasks: file system interactions, HTML processing, database access, web spidering, typesetting, mail processing, home finance, text outlining, and diagram generation. Along the way it also scatters smaller (but equally invaluable) gems, like the elegant explanation of the difference between 'scope' and 'duration' in Chapter 3, or the careful exploration of how best to return error flags in Chapter 4. It even has practical tips for Perl evangelists. Dominus presents even the most complex ideas in simple, comprehensible ways, but never compromises on the precision and attention to detail for which he is so widely and justly admired. His writing isas alwayslucid, eloquent, witty, and compelling. Aptly named, this truly is a Perl book of a higher order, and essential reading for every serious Perl programmer. Damian Conway, Co-designer of Perl 6
“Higher-Order Perl is a terrific book targeted at the advanced Perl programmer with a significant computer science background. The tone, content, and code make Higher-Order Perl memorable; the knowledge, wisdom, and intuition it provides make it a book any Perl programmer should aim to understand and digest in full.. Teodor Zlatanov, Programmer, Gold Software Systems
It is a great book about higher-order programming, which happens to use Perl to illustrate these concepts. Those concepts are directly translatable to other dynamic languages like Python and Ruby.
Simply put, higher order programming is writing programs which write programs. This is an extraordinary powerful technique which can create higher-performing applications with less effort.
Higher Order Perl was originally going to be given some fairly bland name, like "Handbook of Advancted Perl Techniques." This would have been a spot-on (but uninteresting) title. HOP provides the reader with explanation and demonstration of techniques for problem-solving that are often overlooked. The examples are complex and detailed, but not byzantine, and they're built up slowly, piece by piece, so that each line of code's meaning and significance are made clear.
The title "Higher Order Perl" refers to the book's most central technique, functional programming. While many programmers understand how to abstract a specific solution into a more general one, Dominus helps the reader learn to push the envelope, abstracing generic solutions into extremely generalized solutions that can be applied to seemingly-unrelated problems. This is frequently done by the construction of functions that build functions that build functions -- and so on, functions all the way down. Instead of solving the problem in base, earthly Perl, the programmer produces Perl elements of a higher order which, operating in harmony, become all things to all people.Well, I'm hyperbolizing, but I think it would be hard for me to over-emphasize the value of techniques like closures, iterators, and currying. They are, in part, what make Lisp so powerful, and the marriage of Lisp's power and Perl's expressivity is a happy one.As for the writing, it is good. The language is clear and the material is well-presented. One should be cautioned, though, that the book is dense. Dominus is constantly pressing onward, explaining new techniques or new ways to apply already-explained techniques. I found myself reading each page carefully and deliberately, only to turn back to it a few pages later, to be sure that I understood how the new material was relying on the old. It made the book a challenge to read, but it was a thoroughly enjoyable challenge. I never felt so frustrated by a bizarre idea that I gave up or so bored with an over-explained one that I skipped ahead.
Finally, while the techniques that Dominus presents are powerful and advanced, the required knowledge of Perl is not particularly great. Because he clearly explains the key Perl concepts that he uses (especially closures and associated scoping issues), any competent programmer with a working knowledge of Perl should be able to put the ideas in Higher Order Perl to work.
For serious Perl programmers, Higher Order Perl is a must-read book.
It is well worth the 40$ I paid in 2013 for the Kindle edition. If the author will ever publish a new and expanded edition I'll get that too.