Minority Opinions

Not everyone can be mainstream, after all.

Thoughts on Postmodern Perl

with 2 comments

Some time ago, I read Larry Wall’s talk about postmodernism.  Since then, I’ve had a couple of things on my mind, off and on.  First, if postmodernism is so great, why don’t I like Perl anymore?  Second, that I should try the Vorkosigan books.  I’m still in the middle of each, but at least I have some thoughts.

Perl tries to put the emphasis on the programmer, instead of on the computer or the language.  In doing so, it has collected some of the complexity of natural language, requiring fluency to read and write.  Its programmers can easily develop dialects nigh incomprehensible to each other.  Python instead tries to put the emphasis on the problem, by making the program as easy to read as possible.

Perl exposes the ductwork of Unix, but by doing so becomes closely entwined with its idiosyncrasies.  It can basically work on Windows, but I kept running into issues.  Threading, for example, was a nightmare, and led directly to my language switch.  Python instead tries to make messy interfaces smooth; its abstractions tend to simplify the common and safe ways to do something, leaving the powerful minor tweaks available as optional parameters.

Perl eschews minimalism to the degree of having different but parallel interfaces for each of its native types.  In doing so, it all but guarantees confusion between them, and makes new types annoying or awkward to use.  Python moves the meaning of an operator to its operands, allowing user-defined types to use the same interface as the native ones.  The end result looks cleaner, particularly when the operators work intuitively.

On the other hand, perhaps the biggest reason that I no longer use Perl much is that I never found CPAN very useful.  There’s probably a module in there for just about anything, but none of them seemed to solve any problem I ever had.  At least not one that I could find.  So I was stuck working with the built-in functions.  And since those are all in one big flat namespace, I never quite got the hang of modules at all.  (I used to use strict, before I found a system where it didn’t work at all, but even that’s not really much of a module.)

Meanwhile, the library where I used to live carries quite a few books by Lois McMaster Bujold, but the one right by my house has none at all.  Fortunately, the two are linked somehow, and my card works for both, so I checked out one book in each of three series.  Falling Free (checked out because the first Vorkosigan novel was unavailable that day) is wonderful, except for the odd bit of unnecessary resolution at the very end.  I can see why Wall considers it serious literature, given that it deals with themes of slavery, censorship, revolution, and management styles.  It certainly feels more realistic than Ayn Rand, and that goes a long way toward influencing my viewpoint.

The Hallowed Hunt is about as good, but probably less serious.  I always enjoy learning about new magic systems, and this features two.  The climax, though foreshadowed enough to be almost entirely predictable, was paced quickly enough and narrated well enough to keep me up three hours past my bed time; it has been at least three years since I let myself indulge to that level.

The Sharing Knife, on the other hand, I’m not entirely in love with.  Perhaps I’m not as big on emotional drama as epic adventures, or perhaps it’s because a central conflict is the same thing that I find weird at the end of Falling Free.  That said, I’m still working through it at a fairly rapid pace for my recent lifestyle, particularly given its competition.

Advertisements

Written by eswald

12 Jul 2011 at 10:56 pm

Posted in Entertainment, Python

Tagged with ,

2 Responses

Subscribe to comments with RSS.

  1. Nice article; found you through Google+ Sparks…

    I wonder what kind of problems you were tackling that made it so hard for you to find bits and pieces from the CPAN to solve it (or at least work through the process of solution;) also, I think Larry’s talk is really out of date now, with the rest of the Perl community now behind the Modern Perl movement (see http://www.enlightenedperl.org/ for example.) There are also many more modules, and Perl’s class system has seen much revamp from the Moose project.

    Zak B. Elep

    13 Jul 2011 at 3:44 am

    • The big project that drove me away from Perl was a DAIDE server. I had gotten a script to translate between the binary format on the network to the text format on standard input and output, but it failed in various ways on each new computer. One of the ways involved a missing thread library, and another involved the network protocol getting mangled in a way that I now recognize as UTF-8. My first Python program started as a rewrite of that server, and very quickly became so much more, so easily, that I haven’t looked back for more than simple text processing.

      Mostly, though, I just didn’t know enough about CPAN to use or search it properly. Even Python’s equivalent took me a few years to get into; the difference is that Python’s standard library is much better for projects beyond basic file access.

      I have heard about Modern Perl, and Strawberry Perl, and Moose, but not enough to go back to the language in which it now takes me several tries to initialize a hash properly. It simply doesn’t come to mind anymore, except in cases that are just a bit too complicated for sed and cut. Then again, that still puts it ahead of awk, which I haven’t yet used enough to understand…

      eswald

      13 Jul 2011 at 9:51 am


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s