[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Perl Moral Support



On Wed, Mar 15, 2000 at 10:04:04PM -0500, Tom Rathborne wrote:
> The Python/Perl thing sounds a bit to me like Esperanto/English:

I was going to bring up a similar point about Python having the Pascal
nature:
P(ascal|ython) guy:  "Look!  Its clean, its simple, its readable, its easy to 
                      teach!"
Perl guy:            "Its boring."

I guess there are two types of people in this world.  People who
believe discipline stems from the person and people who people
discipline stems from the process.  Kind of a libertarian
vs. necessitarian world view.  Python/Java has the necessitarian view,
Perl/C have the libertarian view, and people with the same view will
gravitate appropriately.

I guess it also depends on your view of the programming art form.
Some people consider the result of the program the art, others
consider the code itself the art.

Something else to note about the cleanliness of Python programs.
There are very few Python programmers and ALOT of Perl programmers.
Not just that, but there's alot of REALLY BAD Perl programmers.  This
is a result of Perl's popularity, not so much a fault of Perl.  The
bad programmers would be bad in any language, they just happen to have
fallen into liking Perl (probably because its alot easier to bang your
head against the keyboard and get something to compile in Perl).  To
make matters worse, some of these people are writing books, teaching
and writing highly visible code (*cough*MattWrightSelenaSol*cough*).

On the flip side, Python is largely used and taught by "champions"
(actually, this is an opinion, not a hard observation).  People who
were already good programmers and are really into Python.  Perl has
its share of these type of model evangelists as well (probably more),
but I'm sure the ratio of Good:Bad is much, much higher in Python's
case simply because there are less Python programmers.  Should it
become popular it'll hit the same problems Perl has.  C and C++
historically had (have?) the same cycle and Java is starting down the
same path.  Object-Oriented programming followed this pattern, too.


Oh, and on the original question, how to counter the "Perl is for
scripting" FUD.  Something like this helps, a quick scan of the
Arena::* hierarchy, modules produced for my current project.

$ find /usr/lib/perl5/site_perl/5.005/Arena* -name '*.pm' | wc -l
     52
$ find /usr/lib/perl5/site_perl/5.005/Arena* -name '*.pm' | xargs ~/bin/codeAnalyzer
7011 lines of code
1556 lines of comments
8444 lines of POD
2345 blank lines
19356 total lines.
336 subroutines
---------------------------
36.22% code.

(There's actually probably about 500-600 subroutines and methods.
Many are auto-generated accessors.)

Look!  A real-world project, written in Perl!  With real statistics!

20,000 lines of code in 50+ libraries is nothing to sneeze at in any
language.  It just happens to be Perl, documented, and mostly OO.
This doesn't even count the actual programs, but they're mostly small
(100-200 lines) since most of the work is done by the libraries.  Add
to that a fairly generous 3:1 C-to-Perl line count ratio and you've
got a substantial system written entirely in Perl.

(I'll be touching on a bit of this project at TPC, BTW)


And again its probably worth mentioning again this study:
http://wwwipd.ira.uka.de/~prechelt/Biblio/jccpprtTR.pdf "An Empirical
Comparison of C, C++, Java, Perl, Python and Rexx for a String/Search
Parsing Program" and to note that Perl and Python come out for the
most part equivalent.

Perl and Python should stop beating up on each other and unite to
kill the REAL ugliness... TCL. :)

-- 

Michael G Schwern      http://www.pobox.com/~schwern/	   schwern@pobox.com
<purl> Hey, Schwern!  THERE IS A HUGE GAZORGANSPLATTEDFARTMONGERING-
 LIGHTENINGBEASTASAURSOPOD BEHIND YOU!	RUN, BEFORE IT GAFLUMMOXES YOUR
 INNARDLYBITS!

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe