What is Python?

Grant Griffin g2 at seebelow.org
Mon Sep 18 16:25:16 EDT 2000


Tim Hammerquist wrote:
> 
> Grant Griffin <g2 at seebelow.org> wrote:
> > p.s.  In case you haven't noticed, this "ly y'rs" schtick is an yet
> > another good reason to switch. <wink>
> 
> Actually, I find myself preferring constant flames to all this "ly y'rs"
> and "<wink>" stuff.  Maybe I'm just not in the spirit.

Seriously, these things all go together.  The constant flames of the
c.l.p.m.--specifically the hostility toward newbies--go hand-in-hand
with the hostility to new users of the language itself.

I'm sure Larry Wall is a nice guy, but his language is pretty mean: it
has more "$@#!$!" curse words than a "Beetle Bailey" comic strip on one
of Sarge's bad days. <wink...er..."flame">

> I'm just not getting all this.  I have no intention of quitting Perl.  I
> enjoy Perl.  I enjoy Python.  This isn't a matter of religion, when you
> can be Mormon when you want multiple wives, but Catholic when you want
> some coffee.  Languages are tools.  Perl is a brilliant tool.  Python is
> a brilliant tool.  Each have their strengths.

My own point of view is not drawn from religion (wherein any faith which
isn't one's own is, _ipso facto_, "unholy"), but from pure pragmatism. 
I literally find it faster, easier, and funner to do _every_ bit of my
scripting-language programming in Python than Perl.  The basic idea is
that since one spends generally spends more time debugging code than
writing it, then readability is more important than terseness.  (And
let's face it: at the current rates, the extra disk space needed to
store readable code is well worth it. <wink>)

Of course, I don't expect that eveyone will share this sensibility; if
Perl makes sense to _you_, more power to 'ya.  But I did it off-and-on
for three years, and my fingers did a lot of walking through the
camel--they probably walked a mile for it.

But my own theory is that Perlers actually revel in the nonsensicalness
of their language, much as a tight-rope walker proudly calls attention
to his lack of a net.  <<karl walenda died>>  It's an ego thing.  That
explains the one-liners and the "just another perl hacker" thing.  

By the way, here's my own personal Python JAPH implementation:

	print "just another perl hacker"

However, back to your point.  I _do_ still use Perl a little.  For one
thing, I've developed a set of little Perl scripts over the years which
I use for various things.  (I've rewritten some of these in Python, but
most remain in Perl.)  Also, the search engine for the dspGuru web site
is written in Perl.  (It's the "Perlfect" search: it's free, and works
great.  I just wish it were written in Python so I could customize it
without having to pay the Perlfect folks. <0.25 wink>)

But in terms of your point about "the best tool for the job", one _does_
have to admit in all fairness that there's at least _one_ thing that
Perl is an order-of-magnitude better at than Python: execute Perl
scripts.

> As a matter of interest, anyone want to convert the following code to
> Python?
> 
> perl -npe 'next unless /\bjudea/i && /\bfront\b/i' /scripts/movies/brian/*

Only if you'll tell us what it does.  <wink>

But I guess if the mettle of a scripting language is to be judged by its
one-linerability, I should confess that Python is a dismal failure: if
you put together its use of indents for blocks, with the fact that none
but its most elemental functions are built-in...well...it's hardly
useful at all.  In fact, here's about the only Python one-liner I can
think of:

	print "Hello, World!"

show-me-a-language-that's-great-for-one-liners-and-i'll-show-you
   -a-language-that-doesn't-scale-well-<wink>-ly y'rs,

=g2
-- 
_____________________________________________________________________

Grant R. Griffin                                       g2 at dspguru.com
Publisher of dspGuru                           http://www.dspguru.com
Iowegian International Corporation	      http://www.iowegian.com



More information about the Python-list mailing list