is the first postmodern
computer language. This probably has something to do with why Python
programmers often hate Perl
. According to Larry Wall
, the creator of Perl,
...the essence of Modernism is to take one cool idea and drive it into the ground.... Think about Lisp, and parentheses. Think about Forth, and stack code. Think about Prolog, and backtracking. Think about Smalltalk, and objects. (Or if you don't want to think about Smalltalk, think about Java, and objects.)
Think about Python, and whitespace. Hi, Guido.
Well...Perl does one thing, and does it well. What it does well is to integrate all its features into one language. More importantly, it does this without making them all look like each other. Ducts shouldn't look like girders, and girders shouldn't look like ducts. Neither of those should look like water pipes, and it's really important that water pipes not look like sewer pipes. Or smell like sewer pipes. Modernism says that we should make all these things look the same (and preferably invisible). Postmodernism says it's okay for them to stick out, and to look different, because a duct ought to look like a duct, and a sewer pipe ought to look like a sewer pipe, and hammer ought to look like a hammer, and a telephone ought to look like either a telephone, or a Star Trek communicator. Things that are different should look different.
--Larry Wall, "Perl, the first postmodern computer language", LinuxWorld Spring 1999
- Perl's regex syntax is similar to that of many other languages and programs.
- Regular Perl syntax is superficially similar to C in its expressions, operators, control structures, and use of semicolons, while modifying things just enough to be more flexible (e.g., Perl's gazillion methods of quoting).
- Plain old documentation, or Pod, is said to be a pale imitation of Donald Knuth's literate programming. On the other hand, it's simple and unobstrusive enough that far more people use it.
- Perl has features of functional programming in its map and grep operators, but you can also do things procedurally if you like.
- Perl has closures like Lisp, if you need them.
- Perl supports many of the conveniences of shell programming, like backticks and file tests.
Both Perl's strengths and weaknesses are directly attributable to this philosophy of getting things done -- practicality over idealism. Or, as Wall's daughter would say, "'Tsall good..." Perl is incredibly flexible and expressive because Larry Wall stole the best features of other languages, without getting hung up by requiring everything to look like a hammer. At the same time, Perl is often bizzare, confusing and downright ugly, again due to the lack of a unifying idea.
"There's more than one way to do it." It could be argued that Perl's unifying idea is the lack of a unifying idea:
Modernism puts the focus squarely on the hammer and the nail. In contrast, postmodernism puts the focus back onto the carpenter. You'll note that carpenters are allowed to choose whether or not to use hammers. They can use saws and tape measures if they choose, too... They're allowed to be creative.
--Larry Wall, "Perl, the first postmodern computer language"
is an essentially creative endeavor, so it's no wonder that there are many Perl hackers
, but no Java hackers. Perl is not just a programming language, it's a cult
Addendum: some people have /msg'ed me with corrections -- that Jamie Zawinski is an instance of a Java hacker, that Larry Wall's concept of modernism is fuzzy... I say, 'tsall good. :)