Adequacy front page
Stories Diaries Polls Users
Google

Web Adequacy.org
Home About Topics Rejects Abortions
This is an archive site only. It is no longer maintained. You can not post comments. You can not make an account. Your email will not be read. Please read this page if you have questions.
Poll
Best "real world" language
C 37%
Fortran 18%
Assembler 21%
Cobol 22%

Votes: 70

 Pearl vs. Python: A Technical Review

 Author:  Topic:  Posted:
Jul 10, 2002
 Comments:
The so-called "language wars" have been raging in the computer science community ever since the first Fortran program was written. There seems to be no end in sight, as people grind their favorite axes over garbage collection, strong typing, JIT-compilation, Object Orientation or whatever other passing fashion is currently trendy in the ivory towers of academia.

Meanwhile, in the real world, programmers are choosing the tools that get the job done. In the web community, this means Pearl, or Python.

In this article, I will be using my years of experience in the b2c and b2b e-commerce sphere to cast some light on a subject which has been causing controversy for years:

In this article, I will be comparing pearl to python to find out which one is best...

perl

More stories about Perl
On why Pearl is not like natural language (Part I)

More stories by
Jon Erikson

Linux in the corporate world
Not just harmless fun
Pornography: How the Liberals won America
Linux: From awk to sed
A final solution to the problem of Evil

Before deciding whether Python is better than Pearl or vice versa, it is important first to establish what they are are and are not.

Unlike compiled languages like Visual Basic, both Python and Pearl are "interpreted languages", meaning every time your computer executes an instruction, it has to recompile its source code on the fly. For some applications, like ICQ, your computer is fast enough to recompile faster than you can generate input, but for most applications, this fact alone is an insurmountable obstacle to using Pearl and Python.

Another important consideration when choosing a language is picking the most robust tool for the job. If you read the fine print on your Pearl and Python EULAs, you'll see that neither language is intended for mission-critical development and deployment in nuclear facilities or air-traffic-control centers. You may think your environment is more fault-tolerant than those, but honestly, you can't afford to have your applications constantly crashing either. If you're willing to put up with lost data and incessant periods of downtime, then by all means, go with Python or Pearl. But if you're more sensible, you'll stick with an industry standard like Java.

Both Pearl and Python are credited with speeding up application development, but the truth is much less forgiving: anyone can develop "faster", if it means performing less-rigorous testing and diving right in without carefully mapping out his game plan. Pearl and Python developers may be faster at what they do, but any gains in speed are vastly outweighed by the shoddy quality of the end product: would you like it slow and right the first time or fast and habitually wrong? There's really no question about it.

Though Python and Pearl have strong followings among inexperienced programmers and Christian fundamentalists, neither has the full backing and support of an actual company. Whereas Microsoft periodically releases bug fixes and security updates for its Visual Basic language and Sun is hard at work improving and releasing new versions of Java, Pearl and Python programmers rely only on the whims of amateur teams of programmers no better than themselves.

When choosing a language, it's important to choose a language whose licensing fits your project. Because Pearl and Python are what is known as "free software", all programs written in those languages must also be given away for free. As you can imagine, this severely limits the applications for which these languages are appropriate. Fortune 500 CEOs on the whole do not like to give away "something for nothing" which is why you will never see a pearl program running a top corporate website.

Unlike mainstream languages like Java and Visual Basic, both Pearl and Python are only available for Unix operating systems. Although I am fully able to install and use Visual Basic on my Microsoft Intel Personal Computer, I was forced to draw my experience with Pearl and Python entirely from IRC and Usenet postings. Whilst it is possible to get a support contract for most languages, try it with Python and Pearl, and you will soon find yourself in "debate" with a 14-year old basement-dwelling hacker, who will first ridicule you, and then tell you to fix your problems yourself, since "you have access to the source code".

Without further ado, onto the comparison:

Pearl

Python

Pearl was created by "linguist" (self-proclaimed anyway, he has a degree but hasn't done any linguistic work in the last 20 years) Larry Wall as a testbed for certain ideas about computer "langauges", and despite its widespread adoption by the Lunix crowd it remains mainly an academic project with all that entails. Python was created by Gweedo Rossum at the University of Antwerp in Belguim in order to correct the flaws in Pearl. Despite Gweedo joining a commercial company afterwards and abandoning Python to the "open source" community, it remains in sporadic development.
Pearl's motto of TLOWTDI (There's Lots Of Ways To Do It) means that for every task there's a useful and handy operator that does the job for you. Yes, every task. Pearl is adrift upon a vast sea of operators and syntax that makes C++ look terse. And what's worse is that Larry has managed the supreme acheivement of incorprating the quirks of real-world langauges into Pearl's syntax, for there is no rhyme nor rhythm in how these operators work. Python on the other was designed to have as little syntax as possible. This means that it can be picked up almost immeadiately by any halfway incompetant idiot, as opposed to Pearl's ridiculously steep learning curve. Unfortunately, this means that to accomplish anything other than adding a pair of numbers, endless nested function calls are required, and extensive use of library functions must be made, adding substantially to code bloat.
It's no exaggeration when they call Perl code line noise:

return(^*%^$% $(^(*&)(*&) (*_&(*&$# %*(&^(*&)(*&)^%^%$## #*%*&^(*&^) (*&(*&)chomp(*&(^%^%$# $#^%)*&)^ ^#%^$^)*&^)suck(*&^^%^ %$^) (^%) (*)shift(*&) (*^*&^ ^%$#":":":":":":":":":":": )slurp(*) (*&*&%^%$ #$#@^$&*&^(*&^(* &*(^%&^%$^%$#)
For example, the above snippit of pearl can crack 128-bit encryption thus enabling hackers to easily steal your credit card details:
Python on the other hand has eliminated the curly brace so beloved of computer scientists. The curly brace which is pure "syntactic sugar" serves no semantic purpose, and therefore can be safely removed, rendering the language more streamlined, and easier to debug. It is also less error prone, since without curly braces, its impossble to put them in the wrong place, thus causing an error or a "bug".
Coming from a non-programing background Pearl doesn't support any of the features of a modern programming language. Most notably, it lacks any concept of object-orientated programming (OOP). This is a serious lack when it comes to developing anything other than throwaway scripts, and is perhaps the main reason why Pearl cannot be considered as a serious contender in enterprise computing. Python supports object-orientated programming. Or at least, Python claims to support object-orientated programming. Upon further investigation it becomes clear what Python actually supports is a limited subset of OOP providing all of the hassle and none of the advantages - where are virtual functions, private members or any of the other vital tools of the trade?
Pearl has a large archive of "extension modules" which provide additional services that Larry left out of the core language. This archive, called CPAN, contains hundreds of these modules, and although the vast majority are things like Pearl-to-Klingon translators, there are a couple of useful modules in there for doing things like processing webpages. Python comes with a better set of modules than Pearl does, which is lucky, because you won't find any other ones around! There is no repositories of extension modules, and seemingly no concept of such a thing amnongst Python zealots!
Pearl has a "linguist" as a designer. You would think this is a good thing, but the problem is, this "linguist" has not published anything in the field of linguistics. He seems to be content to write lurid self-promoting web pages and apologising for his cream of dung programming language. It is clear that pearl has taken on some of the many shortcomings of its creator. The language is cryptic, and unmaintainable by anyone not skilled in the obsolete Unix operating system. Python on the other hand is under the safe stewardship of Guido Van Possum the Australian-American who is also responsible for singlehandedly reversing the decline in the tasmanian Possum. Under Guido's stewardship, Python has evolved from a barely usable scripting language (like awk) to a full-featured industrial strength Object Oriented programming environment. The one thing it it lacks being true lambda functions. Once this minor drawback is fixed (and we are promised that it will be real soon now) we can expect Python to overtake Java and even C++ as the language of choice for the busy b2b and b2c web professional.
Pearl skills are not very useful when it comes to bedding hot chicks. Unfortunately, for better or worse, pearl has become associated with Unix, and for most normal people Unix is synonymous with smelly bearded unwashed hippies. So if you are trying to impress the ladies, best not mention that killer pearl regexp you came up with the other day. Try pretending you have an MCSE. Python is far more sexy than pearl. Python is associated with successful dotcommers, who have survived the dot-bomb and are still making crazy dollars in the cut-throat (but sexy) world of b2b and b2c web commerce. In my experience, admitting a knowledge of python has caused many a young lady to succumb to the temptations of Satan and start "coming on" to me. Fortunately the Bible is very clear on what I should do here. So whilst I don't hide my python skills under a bushel, I likewise do not hesitate to cut off my right hand the moment it starts to offend me.

To conclude. My life as a b2b and b2c entrepreneur is difficult enough in these post dot-bomb times without becoming bogged down in the tedious minutae of programming languages. I find that anything that cannot be done in Java (either with Enterprise JavaBeans or without) is not worth doing.

If you find your boss insists you to do some work in either pearl or python, ask yourself one question: "How am I going feed my family, when my work can be given away for free ?".

Jon Erikson - Senior Consultant NPO Technologies.

       
Tweet

Wow (1.00 / 1) (#9)
by Anonymous Reader on Wed Jul 10th, 2002 at 05:56:57 PM PST
Insightful. However, your constant mispelling of Perl, lead me to believe you shouldn't have bothered. Also, if you are going to include Java and Visual Basic why not include Ruby and other such programming languages?

You seem to lack an understanding of licenses yet wish to bitch about them so much. Free Software doesn't mean you have to "give it away". You are allowed to seek compensation for your work. Under many licenses however you must include the source code as well. However, under the terms of the license you can limit the use of that source code to simple review. sorry to have killed that whole paragraph.

Perl is by know means limited to unices.

Anyone else want a crack at this POS?


Why You Throw Chip? (none / 0) (#10)
by Anonymous Reader on Wed Jul 10th, 2002 at 06:49:02 PM PST
Ha Ha! <a href="http://www.irt.uni-hannover.de/pearl/pearl-gb.html">Pearl</a> Is Spelt The Correctly. Copyright Holder Of IP Of Pearl Also Larry UUall So Funny Man What You Think Of That!?!?!?!?


hope you know (none / 0) (#13)
by detikon on Wed Jul 10th, 2002 at 08:08:42 PM PST
You may be aware that 'perl' was known briefly as 'pearl' before the author realised that the name was already taken.

perl >> Practical Extraction and Report Language

PEARL >> Process and Experiment Automation Realtime Language

Notice something?




Go away or I will replace you with a very small shell script.

You havent looked facts in the face. (5.00 / 3) (#15)
by koanhead on Wed Jul 10th, 2002 at 11:51:35 PM PST
According to its creator, Larry Wall, Perl originally stood for Pathologically Eclectic Rubbish Language. No one was more surprised than Dr. Wall at the keen interest his "language" generated in the boards of virtual profit companies.

"What the heck," he once admitted on Bruce Perens' now defunct technocrat.net, "I sound foolish for admitting it today, but at the time the Internets were not regarded seriously for their advertising potential. How was I to know of the vast deposits of geek guano waiting to be mined just below the surface? None of us suspected a thing, although Randy's instincts came close."

After the Internets Corp. took delivery of the PERL source code from Dr. Larry, they began a program to improve it. First, they tried to compile it. Second, that did not work.

"Hello Open Source tech support the software is free our support is a precious commodity Larry here how may I help you by the way FIRST CALL!!"

"It doesn't compile, Larry."

"You may have to diddle the includes."

Then they tried to compile it. Fourth, that did not work.

"Congratulations. You aren't running Eunice."

Fifth, they downloaded FreeBSD. Then they tried to compile it.

"Your stdio is not very std."

Seventh, they downloaded Lenix. Then they tried to compile it.

Ninth, they decided they weren't going to be the beautiful minds to improve PERL and called a meeting of the acronym department instead. Tenth and finally, PERL became the Practical Extraction and Report Language. The rest, including your reason to live, is history.

"Glad to be of service. Just don't compare it with a real language, or you'll be unhappy. And remember, even if you aren't in doubt, consider the mental welfare of the person who has to maintain the code after you, and who will probably put Perens in the wrong place. Ha ha, I made a +1 Funny."


---
God hates logic.

 
Just say no (1.00 / 1) (#11)
by First Incision on Wed Jul 10th, 2002 at 06:54:16 PM PST
No, we do not want "take a crack." This site if for intelligent discussion; the civilized readers of Adequacy do not take kindly to your drug dealings. Take your illegal activities elsewhere, you crack-smoking Unix-using hippie.
_
_
Do you suffer from late-night hacking? Ask your doctor about Protonix.

Interlligent discussion? (none / 0) (#12)
by detikon on Wed Jul 10th, 2002 at 07:49:01 PM PST
Funny how you fail to respond intelligently. Rather than attempt to appear insightful you resort to pathetic childish name calling. Perhpas your time would be better spent at Nickelodeon.com




Go away or I will replace you with a very small shell script.

I agree (5.00 / 1) (#14)
by First Incision on Wed Jul 10th, 2002 at 09:30:38 PM PST
A few hours after posting that comment, I now notice several glaring errors. I assure you, I proofread and spell-checked that post using Microsoft Word.

I have several theories:

1. I am an idiot
2. An editor thought my post was too insightful, and introduced typos.
3. I am stupid and paranoid.
_
_
Do you suffer from late-night hacking? Ask your doctor about Protonix.

oh jeez (3.00 / 1) (#21)
by Anonymous Reader on Thu Jul 11th, 2002 at 07:58:41 AM PST
Nice backpeddling there elenchos. Or should I say Yoshi. Way to hide your total lack of brains and research by pretending that you have brains and did your research. As this article clearly shows, M$ programs are inherently buggy because Microsoft is lazy and incompetent, so you must be lazy and incompetent for pretending to check your spelling with M$ Worthless when we both know you didn't even do that.

Idiots like you won't ever get the point even if I paint it on a solid-steel dildo and fuck your mom with it. Bill is just up to his old tricks trying to get you to use M$.


how much longer much we suffer your Jeezuz? (5.00 / 1) (#22)
by koanhead on Thu Jul 11th, 2002 at 09:45:22 AM PST
In keeping with the Register's policy of spinning shreds of uninteresting fact wildly out of all proportion, that link does not "explain" a blessed thing, much less that MS[1] is lazy and incompetent. Or am I confusing the Register with your fine editorializing self? Is it possible that you are trying to put your personal enemy, Bill Gates, in the worst possible light under the shadows of our impressionable minds? He must have really fucked your sister! Or are you a twenty-something sometime virgin and all the time Internet pundit, whose life's work is insinuating a witch's brew of allegation, heresy, speculation, opinion and watery fact? You adequack, attacking critics for expressing political skepticism in Lenixism as if the combined life inexperience of cube dwelling crackers carries the legitimacy of Creation science is more outrageous than the feigned dispassion of your tedious and numberless "corrections."

Once again, with feeling this time, you disgust me.

1. You wrote M$. Just so you know and have time to make preparations, that will cease to be funny in the twenty-second century.


---
God hates logic.

 
I think you said it all... (1.00 / 1) (#19)
by furniture on Thu Jul 11th, 2002 at 03:56:29 AM PST
It is Perl.
It is available for win32, OS2, Mac and most other OSs out there.

It is fundamental errors like this that make your argument NULL


you wush (none / 0) (#31)
by Anonymous Reader on Mon Jul 22nd, 2002 at 02:10:07 PM PST
No, it's your ugly, deformed clit-faced mother that makes your entire life NULL.


 
POS? (none / 0) (#23)
by Anonymous Reader on Thu Jul 11th, 2002 at 12:03:32 PM PST
I do maintenance programming on Point Of Sale systems for a living and I've got no idea what you're taking about.


 
haha, fooool (none / 0) (#30)
by Anonymous Reader on Mon Jul 22nd, 2002 at 01:42:07 PM PST
Christ, you are dumb. A 1337 one at that! I dare you to take a crack at this article. I don't think you'll have the smarts to tear it apart- the author is smarter than j00! and all of us perhaps, even jebus the lord herself!


- el monk


 
Small error (4.00 / 1) (#16)
by Anonymous Reader on Thu Jul 11th, 2002 at 12:32:51 AM PST
object-orientated programming (OOP)
The correct term is object-oriented programming. Aside from that, everything seems to be in order.


 
Nice Post ! (none / 0) (#17)
by Anonymous Reader on Thu Jul 11th, 2002 at 12:40:06 AM PST
Perl

Guido van Rossum

Unlike compiled languages like Visual Basic

bug fixes and security updates for its VB

all programs written in those languages must also
be given away for free.

only available for Unix operating systems











Senior Consultant


 
Explain this then: (none / 0) (#18)
by Amitabh Bachan on Thu Jul 11th, 2002 at 03:31:14 AM PST
From the article:

Pearl skills are not very useful when it comes to bedding hot chicks. Unfortunately, for better or worse, pearl has become associated with Unix, and for most normal people Unix is synonymous with smelly bearded unwashed hippies.

So far so good - but how do you explain Heidi Wall? It seems she is impressed with Larry's m4d regexp 5k1llZ.


A conspiracy. (none / 0) (#20)
by Anonymous Reader on Thu Jul 11th, 2002 at 04:08:12 AM PST
Larry and his wife seem to keep birthing daughters, not sons who would carry the family name. I suspect a hedonistic conspiracy.


 
look closer (none / 0) (#32)
by folkdevil on Tue Jul 30th, 2002 at 03:46:13 AM PST
If you read the page you link to you will realise that Heidi is Larry's daughter not his wife.

His wife is called Gloria (check out http://www.wall.org/)


 
Compiled vs. Interpreted (none / 0) (#24)
by araym on Fri Jul 12th, 2002 at 04:44:43 PM PST
In the future, I'd like to see a comparison of compiled vs. interpreted languages. Perhaps you could have Microsoft Visual Basic, a lean and efficient compiled language, go head to head with a slower and bloated interpreted language like assembly or Gnus Not Unix C.


 
Misstatement. (none / 0) (#25)
by em on Sat Jul 13th, 2002 at 09:12:02 PM PST
Pearl's motto of TLOWTDI (There's Lots Of Ways To Do It) means that for every task there's a useful and handy operator that does the job for you.

This statement, while not plainly false, is potentially misleading. It tells a truth-- that if you can think of some task, there will be at least one Pearl operator that performs it, the use of the singular indefinite phrase a useful and handy operator leads the mistaken impression that there is just one.

Thus what TLOWTDI means is that for ever task, there are several useful and handy operators that do the job for you.
--em
Associate Editor, Adequacy.org


Perl's other motto: (1.00 / 1) (#27)
by Anonymous Reader on Wed Jul 17th, 2002 at 09:49:45 PM PST
KISS: Keep It Simple, Stupid


 
Extention (none / 0) (#28)
by Anonymous Reader on Wed Jul 17th, 2002 at 09:54:16 PM PST
Let me explain that a bit.

While there are many handy, useful ways to do something, most often you want to keep yourself down to the shortest code possible. This is because, as an interpreted language, Perl takes extra time parsing each line of code. The actual EXECUTION of code is extremely fast, as the routines are mostly written in C/C++. As such, the fewer lines of code, the faster it will run.

IE: While TLOWTDI, you should always KISS.


The problem with this... (3.00 / 1) (#29)
by flowers on Wed Jul 17th, 2002 at 11:38:23 PM PST
...is that it assumes the processor's time is more valuable than my time. This is not so. The processor's time is less valuable than my time. Therefore, any effort to increase the speed at which a program runs, saving the processor's time, at the expense of making it more difficult to understand, thus expending my time, is complete and utter bollocks in most cases. In the remaining cases, Perl is not a valid option anyway.
---
I have unprotected sex with multiple anonymous partners.

 
This will really help (none / 0) (#26)
by Anonymous Reader on Mon Jul 15th, 2002 at 09:19:13 PM PST
Hi I work for a consulting services. We interview programmers and developers and produces and stuff for Web opportunities, and this article really helped explain Perl and Python for me. I forwarded a link to it to some of my old sorority sisters that also work in HR, keep up the good work and we'll keep reading the site. Maybe then you all won't think we are so STUPID. Ha ha.



 
Are you all stupid (none / 0) (#33)
by Anonymous Reader on Mon Aug 5th, 2002 at 09:49:51 PM PST
do any of you on this site know what you are talking about. let me guess your favorite search engine YAHOO right? you bastard parents and stupid people get a frickin life and stop being paranoid about your kids. you must have something better to do than sit on this site and talk about how you think your kids are turning into hackers. OMG get a life stupid faggots.


 
This article must be a joke! (none / 0) (#34)
by Anonymous Reader on Sat Sep 7th, 2002 at 03:14:54 PM PST
That is the only sensible conclusion I can come to, based on all misconceptions in this article. (I was going to call them errors, only if this is a joke, they aren't.)
--SamB
'U2FtdWVsIEJyb25zb24gPG5hZXN0ZW5AbXlyZWFsYm94LmNvbT4=\n'.decode('base64')



 

All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ® 2001, 2002, 2003 Adequacy.org. The Adequacy.org name, logo, symbol, and taglines "News for Grown-Ups", "Most Controversial Site on the Internet", "Linux Zealot", and "He just loves Open Source Software", and the RGB color value: D7D7D7 are trademarks of Adequacy.org. No part of this site may be republished or reproduced in whatever form without prior written permission by Adequacy.org and, if and when applicable, prior written permission by the contributing author(s), artist(s), or user(s). Any inquiries are directed to legal@adequacy.org.