Choosing Perl/Python for my particular niche

Fred Ma fma at doe.carleton.ca
Tue Mar 30 17:23:50 EST 2004


Robin Munn wrote:
> 
> Fred Ma <fma at doe.carleton.ca> wrote:
> > Hello,
> >
> > This is not a troll posting, and I've refrained from
> > asking because I've seen similar threads get all
> > nitter-nattery.
> [snip: poster is basically asking "Should I learn Perl or Python?"]
> 
> While availability of libraries for your specific tasks is a major
> factor to take into consideration, I'd say that even more important is
> to figure out which language fits your brain.
> 
> I first learned Perl, then Python. I now use Python almost exclusively,
> because I found that Python fits my mental "map" much better than Perl
> does. To me, it seemed like in Perl, everything was a string. Sure, you
> could have objects and classes, but they felt strange and awkward -- how
> do I translate the "bless" keyword into my mental model? Whereas
> Python's object model translated perfectly into my mental map, to the
> point where programming in Python gave a clarity that I never had when
> using Perl. It's hard to explain why, exactly -- it just seemed like
> when using Perl, I was always going back down to the level of details,
> the trees in the forest. Python allows me to look at the entire forest.
> I can still go down and look at trees if I need to, but I don't have to
> operate in that mode all the time.
> 
> Your mileage *will* vary. There's no substitute for experience. Set
> yourself a simple task (say, writing a sieve of Eratosthenes program)
> that you could do in about an hour with a language you're familiar with.
> Then write the same program in Perl and in Python, and see which one
> fits *your* brain better.


Well, my bout with Perl took much, much more than an hour.
It worked, though.  It's probably not enough experience to
get a good look at the strength of Perl.  For example, I
am a vim user (an editor), which is cryptic at first, but
let's you fly when you get to know it.  I'm not saying that
all things cryptic are efficient in the end, just that a
brief bout won't always uncover the strengths.  As a
"working model", I've decided to use Perl as the workhorse,
and keep tabs on Python as time permits.  If my mental map
works better with Python, it's ease of ramping up will
allow the better fit to shine through despite the lesser
time I spend with it.  Then it will naturally take a more
prominent role.  Thanks for the advice on checking out both.
It seems to be the most realistic, and in line with what
many have suggested.

Fred
-- 
Fred Ma
Dept. of Electronics, Carleton University
1125 Colonel By Drive, Ottawa, Ontario
Canada, K1S 5B6



More information about the Python-list mailing list