Python questions from C/Perl/Java programmer

Tom Biggs biggs at erols.com
Tue Aug 29 15:33:13 EDT 2000


Clarence Gardner wrote:

> [Tom Biggs]
> >> I doubt I'll abandon Perl altogether - I try to pick the right
> >> tool for the right job - but Python looks very clean.
> >
> [Tim Peters ]
> >I was a Perl programmer before I picked up Python, but that was in '91(!).

Well, Tim, you gave it up too early...  <grin>   Perl 5 is a blast.

> >After a year or two, you may well find your Perl use reduced to 5-liners!

> >And even then, over & over you find yourself saying "hmm!  If I had written
> >that in Python instead, I wouldn't have had to track down this bug".
>
> Tom, just in case you might feel obliged to pick up Python gradually, let
> me tell you the way I did it.  I was writing mostly Perl with some C when,
> about three years ago, I picked up "Programming Python", read it that night,
> and haven't written a Perl program since.  That day, I started implementing
> a billing system for my company, completely in Python.  When I occasionally
> need to go back and do something to it, it's a breeze and I prostrate myself
> before my icon of Guido and give thanks that I didn't write it in Perl.
>
> I also believe in using the right tool for the job, but somehow none of my
> jobs call for using Perl....

Obviously I must withhold judgment until I learn Python.  Eric Raymond
loved Perl too but judging by the way he raved about Python (pretty much
the same as your reaction, "he ain't workin' on Larry's Farm no more" <grin>)
I may end up the same as you guys.

I recently wrote a whole suite of Perl applications where the data was
so tightly integrated with the hash trees, that the program became
simplicity itself.  I hope I'm not making too bold a claim here but
I've never seen any Perl code anywhere which looked at all like it.
The programs shrank to 20% of their original size after I came up
with the scheme I used, and became (IMO) more understandable.
I'm also very much a fanatic for readable code, too, so I flatter myself
that the programs were easy to someone besides me to pick up
(It's way to easy for the lazy to write totally indecipherable Perl.)
But of course Python has its own 'hash equivalent' data structure
(I'm such a newbie that I can't remember what they're called right
now) so who knows what I will come up with.  And a proper OO
language has to be a big improvement over Perl.   (I used C++
for a project last year and almost ran out screaming - whew, that
'language' is a huge stinking pile of... ah.... erm...  kludges!)

But whichever P language I use, I sure won't miss all that memory
management that I had to do in C and C++.  I just went back to
using C for the project I'm working on.  I've done embedded systems
for years so lots of time spent doing C (and enjoying it), but manually
doing memory management and string parsing and etc. is starting to
get *very* tedious...






More information about the Python-list mailing list