Migrating to perl?

Joel Ricker joejava at dragonat.net
Thu Jan 4 22:56:44 EST 2001


BTW, that subject should have been "Migrating *from* perl?".  I saw the
mistake the instant I hit Post.

Tim Peters wrote in message ...
>[Joel Ricker]
>> I'm thinking of moving from perl to python and I was looking for
>> opinions on the difference.
>
>Don't bother <wink>.  Seriously, download Python, install it, and work your
>way through the tutorial that comes with it.  In no more than a few hours
>you'll know for certain whether Python is for you!  Much more efficient
than
>guessing whether the replies you get here are lying <wink>.


Oh I am.  The Activestate build is being downloaded right now as I write
this while reading an article from the new Open Source Developers Journal
called Perl vs. Python, Which One Is Right For You?  Granted thats pretty
much what I'm asking this newsgroup for but I'm looking for a variety of
opinions.  Be sure that I'll be working on that tutorial shortly.

>> ...
>> So basically what I'd like to know is, how do the two compare?
>
>Python's motto is "there's only one way to do it" -- they're polar extremes
>in some ways.  Python is very uniform in its syntax and semantics (compared
>to Perl, not compared to e.g. Scheme).  That can make it wordier than Perl,
>and, in some cases, slower (for example, regular expressions are just
>another module in Python -- the language proper knows nothing at all about
>them, so can't special-case the snot out of them).  On the other hand, the
>uniformity and makes it much easier to read other peoples' code, and that
>includes your own.


Thats part of the problem I'm running into.  My programming background has
been Pascal in high school almost ten years ago and recently Perl.
Javascript as well but that was pretty easy to learn.  I'm not really sure
I'm going to give up entirely on Perl yet, I've invested too much time and
sunk too much money in books to do a complete 180 but I'm open to
alternatives.

My main need right now is CGI which is why I chose perl in the first place.
It looks like Python can fill in that need as well.

>A simple example should make this clear immediately (cut from an
interactive
>Python shell session):
>
[*snip*] - ah but is it easy :)  The reason I ask is that I'm just learning
OO.  Perl was my first attempt and that was when I was hitting the wall.
I'm sure though its not different from any other OO implementation and so I
should direct that questions to other appropriate resources.

But if anyone has written a thorough tutorial on Python OO, I'll be half
convinved <wink>.

>You even get to name your arguments in Python, just like in a real language
><wink>.


Great, just like the good ol days.

[*snip*]

>The day I was proudest of comp.lang.python was a day last year when, at a
>very busy time, someone posted the question "what's a text editor?".
>Amazingly, they got several gentle introductions to the topic.
>
>That doesn't mean we're not vicious, though:  just try suggesting that
>Python should add curly braces <0.9 wink>.


Thats refreshing to hear.  When I first got involved with Usenet (circa 92)
that was the general attitude but things have changed but this is a
different time *sigh*.  I've saw a very brutal response once in a Perl
mailing list when someone asked a very simple question, something like how
do you get the greater of two numbers or something like that.  Granted the
person should have looked at the documentation or even picked up Learning
Perl but it didn't warrant the attack that ensued.

>you-also-have-to-put-with-<wink>s-and-stupid-signoff-
>    lines-here-ly y'rs  - tim


That I think I can handle <wink>.

Thanks,
Joel







More information about the Python-list mailing list