Perl is not a multi-paradigm language

Perl is a dialecting programming language.

A dialecticing language is a super-set of a multi-paradigm language. Lisp is another dialecting language.

Unlike lisp, where everything looks like an s-exp, a Perl dialect will look ridiculously different from Perl.

Officially, I think we can recognize the following dialects of Perl

  • Perl[1-4] : the Perl that everyone hates
  • CPAN perl : a dialect of Perl, which emerged with maintainability, readability and reusability as the core concern. (The changes introduced in Perl5 started the dialecting trend in Perl)
  • Perl5.[10-14+] aka Modern Perl : another dialect of Perl, now recommended for both script writers and cpan users. Modern Perl is that which adhres to the Grammar Nazi.

Any code that passes through Perl::Critic and Perl::Tidy is a safe bet on robustness and clarity, which is an improvement over the earlier dialects.

With a couple of modules you can even write Perl like ruby.

Using BEGIN and END blocks you can write Perl like awk.

Higher Order Perl by mjd gives Perl a functional spin.

A dialecting programming language has good consequences

  • Speaking it, Writing it is fun
  • Experimentation and all the good things it leads to
  • Adaptability (This is by far the biggest asset of perl)
  • Immortality
  • Freedom of expression reigns supreme
  • The possible "solution space" is broader
  • Good practices change with the discovery of new solutions

The terrible consequences

  • A dialect puts a strain on the parent community
  • Old dialects die hard
  • Debugging is a pain
  • Translation is difficult
  • There is an initial training cost involved in learning a new dialect (but not too much)
  • "Code is foreverrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr"
  • A dialect, can become embedded in a local community

Both good and terrible

  • A module in CPAN has the potential to completely affect the way you think or write in Perl. (For the paranoid, an experimental dialect always comes with bells and whistles)

This is problem that Perl shares with Lisp. And frankly perl is becoming more lisp like with reader-macros.

Any one who wants to be a Perl developer _has_ to come to terms with this basterd nature of Perl.



It sucks that the trend for Perl syntax is to be more like a language that is less used than ours is. :(

You mean Ada? ;-)

Leave a comment

About [deleted]

user-pic I blog about Perl.