Python vs. Perl
Sean 'Shaleh' Perry
shaleh at valinux.com
Tue May 22 19:25:01 EDT 2001
> It doesn't seem good enough to convince me to get knee deep, however. I am
> going to miss a lot of the C features that I live and die by (while (a =
> getc())), and I am going to miss the "do this or die unless that" aspect of
> Perl. What does Python have that makes it so great? Why should I spend time
> to become intimate with it? I am looking for comments from people that
> actually have used Perl or C/C++ extensively, and I am looking for comments
> that go beyond the FAQ.
>
I was C(++) -> perl -> python. So I got all of my bad habits out early (-:
Python gives me code that I have a better chance of understanding a year from
now. Ever looked back at some perl (or sometimes C) code you wrote 6 months
ago at a different job?
I learned OO fairly in my computing career and find that many problems I attack
have good OO solutions. Python gives me OO with ease. I have recently been
reading a great book on perl OO and am not in the least pleased with perl as an
OO language.
While it took me a month or so to get out of the "while((c = getc()))" habit, I
also no longer have "if (foo = is_func()) /* oops meant foo == is_func() */"
issues. I have found that those deep C desires are there because C is a lower
level language. It is sooo much easier to think in terms of 'for line in
file.lines(): handle_line(line)'.
Perl's expressive nature is nice at times, but then Perl bites you in some
other way. True, poetry is nice but sometimes I like simplicity.
More information about the Python-list
mailing list