On Tue, May 08, 2001 at 01:57:25PM -0700, Cory Petkovsek wrote:

> I think this has already been mentioned before, but I'm finding the
> need to learn a scripting language.  Something more powerful than
> bash, but not as indepth(?) as C.
> 
> I currently know C, C++ and Java.  Can anyone tell me in about a
> paragraph why I should learn perl or python or
> $your_favorite_scripting_language?  I don't need to be sold hard, I
> just want a few highlights of each language, especially how it is
> related to bash and C or C++ (not java ;(

I know Perl pretty thoroughly.  I have written a few dozen lines of
Python.  If I needed to learn a scripting language today, I would pick
Python, but I have too much invested in Perl to make the switch.

Perl is very powerful and very ugly.  Its power comes from having nearly
all of libc built in, and from the Comprehensive Perl Archive Network
(CPAN), a truly huge library.  I always start a nontrivial Perl project
by searching CPAN for keywords.  Perl also has strong regular expression
support fairly well integrated into the language.  Not all problems
need regexps in their solution, but when they do, you can't beat Perl.

Perl is also ugly.  Its semantics are just weird because perl 3 and
perl 4 had no datastructures except lists (one-dimensional vectors)
and hashes, and it only had dynamic scoping.  References (pointers),
objects, and lexical scoping were added in perl 5, and Perl suffers
from its legacy.  Perl also uses lots of punctuation, and the
punctuation makes programs hard to read.

Python does not yet have anything equivalent to CPAN, but it's
a much cleaner design, since it was object oriented and lexically
scoped from the beginning.

                                        K<bob>

Reply via email to