in reply to Revisiting the old clichés of programming languages

"Perl is prone to obfuscation: There is too much to argue here, maybe it is a matter of taste. In my opinion, you can write pretty obfuscated or very readable code in Perl."

The easier something is to use, the easier it is for people to abuse :P

On a serious note, I hear that from time to time when speaking to php/.net programmers. My usual argument to this point is that individuals can write ugly code in most languages, but to me that says more about the individual than the language. Your code is well document and commented right? :P

IMHO this Perl myth is covered particularly well in Perl Best Practices.

Cheers,

Martin

  • Comment on Re: Revisiting the old clichés of programming languages

Replies are listed 'Best First'.
Re^2: Revisiting the old clichés of programming languages
by Lawliet (Curate) on Jan 26, 2009 at 17:52 UTC
    The easier something is to use, the easier it is for people to abuse :P

    Could this be why PHP has such a bad wrap? The plethora of pompous PHP pupils perfect the pestiferous pinhead pattern pronounced prevalently perceived by prime programmers (primarily at PerlMonks).

    I am not really sure where I was going with this post <.<

    And you didn't even know bears could type.

      Yes and no. The badness of PHP wasn't limited to the code of some individuals. There are serious problems with PHP itself. For example, there were no local variables until recently. See http://www.tnx.nl/php.html for more.

        I would go with more yes than no, personally. (Note: I write PHP for a living. Try not to hold it against me :)

        Yes, PHP has serious inbuilt failings. But in general, outside of a relatively few places, PHP doesn't get its denigration for them; it gets it for the lousy code written. And most of that (again, with a few outstanding exceptions) isn't lousy because of language failures, but because of programmer failures.

        I would say the primary reason for that is that the PHP crowd is full of people who aren't programmers who learned PHP, but rather people who picked up PHP and became programmers. It's so easy! You just take that static webpage you already have, change the extension, and cram a <?php in one place to add a randomized quote, or show the current time, or do SSI a bit more expensively (but these days, more portably). Bam! Suddenly, you're on the path to writing programs, without any programming background.

        Most of the PHP you run across was written by people who didn't have a programming background when they wrote it. That's why it's got all the failings it has. PHP may make it easy to do some stupid things, but its failings aren't directly at fault in most of those situations.

        If the programmers involved had picked up equivalent knowledge of perl or python or lisp instead and were using it, they'd have written code that was equally broken. They just generally don't, because you don't tend to learn most languages unless you're a programmer (or consciously trying to become one). PHP's positioning makes it an excellent gateway drug for people who don't even know it's a drug.