Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Comment on


Whew. Tough question, and I may not be the best person to answer it, but I'll give it a whirl. I personally have encountered resistance to Perl (though not as strong as you describe) in two very different environments: 1) a Computer Science department at a prestigious academic institution, and 2) the IT department of a large corporation whose primary business has fairly little to do with IT.

First of all, I think part of the problem is simply technical; that is, many of these people have never seen well-written idiomatic Perl 5 code that takes advantage of things like modules, nested data structures, objects, coderefs, and m//x. The code they've seen consists mostly of global variables, typeglobs, eval-strings and indecipherable regexes.

Beyond that, it depends on the background so I'll try to address the two separately.

  • Computer Scientists view programming languages not only as tools, but also as objects of study. Those involved in areas such as formal semantics, compilers, and the like look askance at any language that cannot, say, be fully described by an LALR(1) grammar. They also take a pretty formal view of data structures. To them, a data structure such as a double-ended queue or a hash table has a strict interface whose implementation not only can but must be hidden from calling programs. They scoff at Perl's lack of data isolation of this kind and are not amused by the shotgun analogy. By the way, C does not have these kinds of data structures natively -- it's a very low-level language. But it is possible to implement data structures in C in a cleanly isolated way. The catch, of course, is that it's hard. C is enormously more difficult to write than Perl because you have to manage your own menory. All that said, many of these folks use Perl and recognize its strengths in one specific area: rapid prototyping. But they would never write serious code in Perl. In fact I once heard a professor say (and mind you I respect him enormously in almost all other aspects) that "there is no such thing as programming style in Perl."
  • In the corporate world it's something different altogether. In their case, it's a somewhat irrational fear that because Perl "naturally" lends itself to obfuscation, new developers may find it more difficult to pick up old code. CIOs have generally accepted PHP hook, line, and sinker, and will not listen when you warn them that the language is unscalable by design in terms of project complexity. The reason is that PHP is seen as easier and this is a big deal because CIOs have two issues to worry about that most open source developers don't: 1) tight deadlines, and 2) relatively weak developer talent for the types of applications they are often building. Also, and I don't know why PHP is allowed as an exception, corporations have a fear of any product, including software platforms, that do not bear the stamp of a particular vendor. I've seen many instances where people bought proprietary software that was utter crap when perfectly good open source solutions exist, just so that they can feel like it's the vendor's fault when the project doesn't work out as well as planned.

As for your proposed objections

Blinding speed? Tight, highly-predictable RAM usage?


Compiling code into binaries so that nobody can read their source?

Yes again. And frankly, for code that's to be distributed to customers on a commercial basis, I honestly think that's a fair objection. Of course, if they believe Java is a solution here they're damned fools because decompiling Java is fairly trivial.

By the way, while it is true that writing obfuscated Java code would be nigh on impossible, C is another matter altogether. Obfuscated C contests were a venerable tradition before Perl was even born, and believe me I've seen "serious" C code that was pretty darn obfuscated.

Note: Please don't interpret my comments as dismissive of Computer Scientists. I greatly admire the work that they do and have some ambitions to return to the field myself. I just think some of them have silly attitudes about certain things.

In reply to Re: Seeker Of Perl Sympathy by Errto
in thread Seeker Of Perl Sympathy by Cody Pendant

and:  <code> code here </code>

  • Please read these before you post! —
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others taking refuge in the Monastery: (16)
    As of 2014-07-10 14:42 GMT
    Find Nodes?
      Voting Booth?

      When choosing user names for websites, I prefer to use:

      Results (212 votes), past polls