John Siracusa discusses Perl on Hypercritical

In episode #15 of Hypercritical, John Siracusa presented Perl in (largely) a very positive light to what I assume is mostly a non-Perl audience.

I'm including my notes on the discussion below, but I recommend listening to the podcast yourself to form your own impression: http://5by5.tv/hypercritical/15

I couldn't find a discussion area linked from the episode page, but I noticed someone posted it to Hacker News as "John Siracusa and Dan Benjamin on high-level programming languages [podcast]."


Notes on Hypercritical #15

Geeks love a meritocracy, but languages often become popular for reasons other than their technical merit. Why do languages become popular? They are the official language of a platform. They promise the ability to write once, run everywhere. They enable a new type of application (i.e. CGI). They allow you to use the hot new thing (Rails). It's your only choice (JavaScript, Flash).

Most languages stink.

What should a high level language have?

  1. Memory management
  2. Native Unicode strings
  3. Native regular expressions
  4. Native object system
  5. Named parameters
  6. Succinct syntax for common operations
  7. Acknowledgement, at least, of concurrency

Languages are slow to change, unless controlled by a single vendor (i.e. C#).

In considering the aesthetics of a language, many people find non-word characters ugly (but it depends on which languages you come from). Sometimes the prettier language (or fighter jet) wins.

The major objection to Perl from non-Perl people is probably that Perl is ugly. They may not like the dollar signs. Perl was their first exposure to regular expressions.

John: "What objections do you have to Perl?"

Dan (playing devil's advocate, somewhat): "Legibility. Where are the frameworks? Where is the next generational thinking? What can Perl do besides text parsing? How is Perl used in the real world?"

People looked a Perl long ago and haven't looked again. They dismiss it.

What's wrong with Perl?

  1. Unexpected default object system (build your own), but this is also a strength
  2. No language specification (only perl can parse Perl)

What's good about Perl?

  1. Perl has been a breeding ground for object system experimentation
  2. Perl has the largest group of developers doing "advanced stuff" in a semi-popular language
  3. Perl has practically every advanced feature found in other languages
  4. Perl can and does incorporate computer science research, such as the 2002 paper "Traits: Composable Units of Behavior". This is possible because Perl is a backwater and doesn't have popular API's or platforms tied to it.

Other languages should go ahead and steal ideas from Perl, as Perl has from other languages.

Dan: In 2011, the popular apps to build are for the web, mobile, and desktop. Why should someone learn Perl?

John: Language choice should depend on the task. Use PHP for its ease of deployment. Use Ruby if you want Rails (an aside: the main insight from Rails is convention over configuration).

What would you use Perl for these days?. . . [pause]

  1. You *could* write web applications in Perl, but it's not recommended. Use whatever is popular (currently Ruby on Rails, something Python, PHP if necessary) in order to get more support, lots of books, etc.
  2. You could rewrite your slow application in Perl because Perl offers great interfaces to fast C libraries.

Reasons you might find yourself writing Perl

  1. You and your team already know Perl
  2. You're working on a (perhaps legacy) application that was originally written in Perl and there is no reason to re-write it.
  3. You're looking for experience in a different language and way of thinking.

Perl people have a hippie/creative slant to them. They are artsy/fartsy in a liberal arts sort of way.

Leave a comment

About Philip Durbin

user-pic I blog about Perl.