Re: C or Perl? Which is the better script language? (Formely:Re: Delphi Dusts Visual Basic)

From: Mark A. Scarton <marksc_at_wpmail.code3.com>
Date: 1996/01/26
Message-ID: <DLssG1.ECo_at_hsi.com>#1/1


alvin_at_top.cis.syr.edu (Alvin Leung) wrote:
> Java all the way!!
> My advasor said perl can be used to make quick prototype. However, perl have
>nothing like C, except some keywords, so you have to rewrite the project in C.
>Now, your prototype looks nothing like your production code. I said it is a proof
>of concept tools.

I'd really like to know some of the details as to why your advisor directed you this way. Ignoring the issue that the original post specifically asked which was the better tool for _scripting_, not programming, I can state from my own experience that servers (Unix daemons) can be written in perl in about 25% the time that it takes in C. Even without the publically accessible perl mods.

The main trade-off seems to be performance versus development/maintenance time. If the performance of a routine is critical, say for an interactive application or a component of the OS, C makes more sense. If aggregate throughput is more the issue _and_ the time to market is a critical factor, perl makes more sense.

I recently had the opportunity to design and develop the back-end servers for a hospital order entry system. I did about 6 programs in C, mainly interfaces to the Unix kernel services, and the remainder in Perl. The perl components included interfaces to Transarc's Encina / DCE and their queueing system.

> C++ is a junk yard of Object-oriented programing and C. You find bits and
>parts of the features you needed, but never the full features.

Once again, you need to get specific. I wrote an entire radar system in C and C++, including the operator's command station. It interfaced to hardware devices via IEEE 488 bus, provided a command and roll-and-scroll operator window, a graphic display system with topological display, etc. It took a year and a half, about 125,000 lines of code.

I think that what you'll find is that each of these, C, C++, Perl, and Java, have their places in this industry. Just as we don't attempt to solve every household problem with a hammer, it is important that we choose the proper tool for the problem. I won't write an expert system in C (again), I'd use Prolog or LISP. I won't attempt to extend the kernel dispatcher in Perl.

An interesting discussion, then, would be to characterize those types of tasks for which each language excels and those for which they would not be appropriate. My guess is that you'll find that each has a niche in which it is _the_ tool for the job, and then that it _can_ be used in other areas as well.

Anyone want to get the ball rolling??? Let's consider:

Visual Basic, Delphi, Java, Perl, C, C++, Prolog, LISP, Ada, ksh, ....

And please, only from experience...not conjecture. Mark A. Scarton, ABD
CompUtah!, Park City, Utah USA
Home: 801.565.9835
Office: 801.265-4612 Received on Fri Jan 26 1996 - 00:00:00 CET

Original text of this message