Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 May 1996 10:40:25 +0200 (MET DST)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        freebsd-chat@freebsd.org
Cc:        dima@freebsd.org (Dima Ruban)
Subject:   Re: Adduser program in C
Message-ID:  <199605260840.KAA01190@uriah.heep.sax.de>
In-Reply-To: <199605252305.QAA19014@freefall.freebsd.org> from Dima Ruban at "May 25, 96 04:04:59 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
As Dima Ruban wrote:

> > Perl is certainly one of the fastest scripting languages.
> 
> fastest scripting language != fastest programming language.

Right.  But for many of us, the time to write and maintain a program
does also count, and that's where scripting languages win.

> I don't think perl script is going to be faster when the same C program.

That depends.  You can write poor programs with every language.  If
the Perl program is large (so the compilation time doesn't matter too
much), you can easily have well-written Perl and C programs that run
at roughly the same speed.

If you pick something like Perl to write things with it that have to
be written with awk/sed/sh/sort pipelines, the classic solution is
often slower.  (Again: i don't speak about _rewriting_ an existing
application, only about the decision of tools when writing something
new.)

> About scripting language ... One of my clients had chat script for his
> WWW server written on perl. Standard load average on this machine was
> 40-70!!!!!
> And now it keeps under 10 only becasue I wrote this script on C.

But only since your C program is well-written, and the Perl program
not.  I think i could also write you a C program that would even
higher the load of the system. :)

Anyway, as somebody else also replied: nobody claims that there is The
One True Programming Language.  The argumentation that was starting
all this was: ``I will rewrite it in C, since i'm too lazy to get the
Perl one.''

> Maybe some day, when computer will have lotsa memory and at least 10 times
> faster CPUs, maybe then perl will become standard or something.

I beg to disagree.  Unless your entire equipment is 386/16's or such,
you've already got enough computing power to base your decision of
tools on ease of use and elegance, instead on resource tightness.
Look at all the nice Tcl/Tk applications.  They usually aren't slower
than say the average Winloose application -- and they are entirely
interpreted!  But they wouldn't even be there if there was not Tcl:
nobody would have had the time to write them.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605260840.KAA01190>