Subject: Re: NetBSD Web Site powered by Perl
To: None <current-users@NetBSD.ORG>
From: Jaromir Dolecek <dolecek@ics.muni.cz>
List: current-users
Date: 01/23/1998 16:29:21
Ted Lemon wrote:
> 
> > While I'm not agitating for adding perl either and as many might
> > know I write more shell scripts than most :-), I must point out
> > that for non-trivial scripts, the perl equivalent is typically at
> > least 3 times faster.
> 
> And three times buggier.   I have pretty much given up writing new
> stuff in PERL for that reason - if it's complicated enough to warrant
> using PERL, it's probably safer to write it in C.

I would never persuade anyone Perl is the best language in our
Galaxy.  But it's fast and powerful tool, suitable for many tasks.
There are other, maybe better alternatives, but arguing that writing
in C is better than writing in Perl is IMHO bogus.

I personally use C only when I need maximum speed and don't care
that I must explicitly (de)allocate memory for anything.
I prefer scripting languages, I can concentrate on what I want
to do instead of finding, whether the (char *) pointer points to right
place ;-) And easy-to-use dictionaries (or, to speak Perl, hashes)
are Good Thing (TM) too.

I use Perl almost exclusively for all my staff just now (with
exception with one-shot-scripts, which are generally easier to
write in shell). I would never use shell scripts somewhere, where
I need speed (such as CGI) - it's much much slower (mainly because
it starts lot of processes). I would never use C-program somewhere,
where I need maximum flexibility (having to compile each time something
changes is too much pain in majority of cases). Did you ever
lost sources to a C program, which has worked for long time without
problems and suddenly breakes ? I did, it's not something I would like
to undergo often :-(

Perl as language is rather mixed and it's hard to write code way
readable to any other person (or to you after two months :-) ).
I can't emagine writing bigger project in Perl.  There are better,
simplier and smarter languages - Python is my favourite.

But Perl is definitely better than any shell script and many C
programs - if only for fact, that it is no big pain to run the Perl
script on other OS, than it was written on (which is generally not
case for shell script, definitely not for compiled C-program and
often not true even if you have sources).

There was a question in Perl Book - why there is a camel on it ?
Answer is simple: it's ugly like hell, but can go long ways.

Best regards

Jaromir
-- 
Jaromir Dolecek <dolecek@ics.muni.cz>	http://www.ics.muni.cz/~dolecek/
-------------------------------------------------------------------------
It is better never to have been born.  But who among us has such luck?
One in a million, perhaps.