in reply to Perl and London Broil: The future of computing magic?

So many technologies emerge as highly-targeted solutions, which are then pushed to do more than they were designed to do. PHP is an example. I got the impression---even when I used to write PHP several years ago---that it was designed to be a sort of one-off embedded Perl to simplify CGI. This isn't all that different from Ruby on Rails, which makes the simple use cases easy, but the more complicated ones are still difficult. A technology designed to make one or two special cases trivial has the tendency to make everything else no easier; and it frequently makes them more awkward, if not actually harder.

Perl's strength lies largely in refusing to commit to any given problem domain. So when I read people complaining about Perl's baroque syntax, I realize they really don't get it. Perl's refusal to be a fill in the blank language is precisely why it is a good fit in so many other places. To misquote a friend, Perl isn't best at anything; it's best at everything.

I work with some people who denigrate Perl and look longingly to Python/Ruby/Erlang, etc. Those are fine languages, and there's nothing wrong with using them. But I've written code in a lot of languages, and I always enjoy coming back to Perl. Baroque syntax is annoying, and the promise of "cleaner code" is appealing. But I have to say, solving the same problem in other languages never actually comes out as cleanly or succinctly as promised. It seems I always end up with something that's a little clumsier than what Perl can give me.

And I need hardly mention the Perl written by those who look elsewhere is hardly masterful. I'm left with the opinion that, had they merely tried to learn Perl correctly in the first place, there would be no real appeal in looking elsewhere. Which is not to say I never use other languages! I use several, but Perl is the one I find myself using most frequently.

I am once more struck by the wisdom of a mentor who told me Perl's biggest problem is, people aren't taught to write good Perl. The interpreter can read all sorts of garbage as real code, so there's not a lot of incentive to writing good stuff. And because the Perl community has had so many people wanting to show that off, we've developed an unfortunate reputation for obscurity in our code. Perl isn't a "read-only language" but we've done a good job of convincing people it is. I am convinced that's our biggest problem when it comes to advocacy.

I rambled a bit there.

  • Comment on Re: Perl and London Broil: The future of computing magic?