LWN.net Logo

On the future of Perl 5

On the future of Perl 5

Posted Dec 4, 2008 20:22 UTC (Thu) by elanthis (guest, #6227)
In reply to: On the future of Perl 5 by njs
Parent article: On the future of Perl 5

Unless you fail to understand what the percentages mean. :) Reminds me of how people keep claiming that PC games are dying because the percentage of PC sales vs console sales keeps shrinking, despite the fact that PC games are making more money year after year... statistics are useless if you don't analyze them intelligently.

The amount of bad code a language is going to have can be highly dependent on the language's popularity with novice and hobbyist programmers. Take JavaScript, for example. Almost every last single bit of JavaScript I've seen in real projects has been absolutely atrocious. Most of it actually breaks the rules that JavaScript implies, and ends up resulting in bugs that are not the language's fault.

It's a symptom of the fact that there are millions of people writing JavaScript code that have not a single ounce of real computer science software engineering education.

The same tends to be true for Perl in terms of UNIX/Linux scripting. It's the language-of-choice for users in that environment who need to hack together some quick something-er-other, so you get a lot of unskilled folks putting together crappy code because they don't know any better.

The worst thing that you could say about Perl is that its syntax makes it possible for unskilled programmers to write very ugly code, while other languages make it difficult for unskilled programmers to do anything without first learning a bunch of concepts and uncompromising syntax rules. Python, touted as an oh-so easy language, requires a user to learn more; you must understand OOP, scoping, function calls, variables, etc. to get anything done. In Perl, you can get an amazing amount done without understanding much at all.


(Log in to post comments)

On the future of Perl 5

Posted Dec 4, 2008 20:51 UTC (Thu) by njs (guest, #40338) [Link]

Well, yes, perl attracts beginner programmers. (Let's put aside for the moment whether python, originally designed as a first language for newbies, does the same.) But that's not what I'm talking about, which is why *I already said* that IME, expert code is also uglier on average in perl than, say, python.

My claim is simply this: in perl the path of least resistance is ugly code. That doesn't contradict your point: if your strength of will never falters then you can resist this and indeed, produce uniformly beautiful code - we agree. But, contrary to geek standard philosophy, real humans are not perfect rational agents. I have my moments of weakness. I suspect you do too. Can you really say you never succumb to temptation against your better judgement? Humans are messy critters, and ignoring that feels good but it doesn't actually help; we do better to admit it, study it, and design our systems to support our strengths while de-emphasizing our weaknesses.

On the future of Perl 5

Posted Dec 6, 2008 16:46 UTC (Sat) by sbergman27 (guest, #10767) [Link]

"""
python, originally designed as a first language for newbies,
"""

To my knowledge Python was designed as a successor to ABC, and with practical goals in mind. Although it is often recommended as a first language, I do not believe that it was originally designed as one.

On the future of Perl 5

Posted Dec 7, 2008 0:27 UTC (Sun) by njs (guest, #40338) [Link]

Right, I was thinking of the "Computer programming for Everybody" computer literacy initiative that got Python DARPA funding in early years; it looks like the history is more complicated than I implied, though.

On the future of Perl 5

Posted Dec 5, 2008 0:47 UTC (Fri) by johnkarp (subscriber, #39285) [Link]

Personally, I found it much easier to learn Python than Perl. I learned largely by reading existing programs. The bizarre use of punctuation, umpteen ways to write a conditional statement, and shuffling with 'shift' and '$_' are all somewhat offputting. In contrast, python reads like psuedocode in an algorithms textbook.

(I do end up using perl more than python at the moment, though I'd use ruby if that were supported where I worked.)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds