In my tutorial at OSCon earlier this month, I raised the following point:
Perl is not one skillset. Perl is one brand of power tools.I came up with this to address some long-standing criticisms and misconceptions about Perl.
First, if Perl is just one language, then any skilled Perl programmer should be able to read and understand any Perl program and understand what it does pretty quickly. In practice, this is often not the case. The first time I looked at wwwboard.pl many years ago, I couldn't understand what it did, but I could tell it was poorly written and buggy.
On the opposite end of the spectrum, Perl allows you to program in a way you feel comfortable programming. The goal is for you to increase your productivity. David Megginson's XML::Writer module is a case in point. It's Object Oriented, but in a very, um, idiosyncratic way. If you look at the code, you'll see a lot of closures in the constructor. I wouldn't expect J. Random Perlhacker to recognize this idiom at first sight, nor figure out precisely how to extend it after seeing the module for the first time.
Second, Perl is not one skillset, but an environment that supports multiple skillsets. The kind of programming I do when writing quick hacks is abhorrent. Global variables all over the place. No code abstracted away into modules. Copy-and-paste coding peppered about. No test code, and often no documentation. But it's supposed to be that way. What's the point in documenting and testing a 12 line program that'll be run maybe a dozen times in ideal conditions. Here, duct tape really is the way to go, and taking the time to sit down and get the UML diagram just right before writing a dozen Java classes (with unit tests) is truly counterproductive.
On the other hand, on a large project, duct tape coding practices need to go out the window. Test cases, documentation, good style and modular programming are all the norm, and for good reason. Some people specialize in one subdomain or another. Some people can switch between these domains fluidly. Al of this is just proof that Perl is much more than "a single skillset".
The best analogy I've heard to describe the vast breadth and depth that Perl is more like a line of interoperable power tools. Sometimes you need a tablesaw to get a whole mess of wood sized perfectly. Sometimes you need a hand-held saw for some touch-up jobs. With Perl, you have both, but it's up to you to know when you need the hand tools, and when you need the heavy machinery.
Re:All programming styles in Perl
jonasbn on 2003-08-09T21:21:25
There is a mailinglist on Aspect oriented programming and Perl - perl-aspects@astray.com
Even google gives several interesting results.