Article View: comp.unix.shell
Article #4590Re: Gawk v24.7: Why Bother???
From: Beirne Konarski
Date: Sun, 30 Apr 1995 00:00
Date: Sun, 30 Apr 1995 00:00
45 lines
3184 bytes
3184 bytes
Jeremy Mathers (pynq@ellis.uchicago.edu) wrote:
: In article <3n8qt8$shf@smurf.noris.de>,
: Matthias Urlichs <urlichs@smurf.noris.de> wrote:
: ...
: >NB: (THis is a semi-serious question) Is there anything at all which gawk
: > can do better than Perl5?
: One quarter-serious response: No, but then again, you could ask yourself:
: "Is there anything at all that perl can do better than assembler?"
: To many people, the syntax of Perl resembles that of assembler.
: Actually, I'm kidding here, but if you substituted "C" or "Teco" for
: "assembler", you'd be on the mark. Can anyone give a really cogent
: reason for using Perl instead of C?
The big reason for me is that I don't have to worry about building the basic
data structures. Perl expands strings to whatever length necessary to hold
the contents. It does the same with arrays. It also has associative arrays.
In short, I can manipulate a lot of data without having to worry much about
how it is stored. Now, I realize that you can write libraries to do all these
things, but I don't have one. I also do c++, which has string objects, but I
find the Perl way of handling strings to be much easier.
I also prefer Perl to LISP; not that anyone asked, but I just finished a
natural language program that I wrote in Perl. The teacher gave us free
choice, and I think one guy was going to use C, and everyone else was using
LISP. LISP has the purest and simplest syntax of just about any language,
but the complexity is all in the parentheses. I had to learn some new
Perl 5 syntax on this one, to do references, but it wasn't too hard, and it
was a lot easier to track down references when debugging than it was to
count parentheses. And I didn't have to do any malloc's or frees (this is of
course a comparison to C, not LISP).
In both cases the key to Perl is that Perl hides a lot of complexity from
the programmer and spares the programmer a lot of tedious work.
Beirne
--
-------------------------------------------------------------------------------
Beirne Konarski | Subscribe to the Unicycling Mailing List
bkonarsk@mcs.kent.edu | Send requests to unicycling-request@mcs.kent.edu
"Untouched by Scandal" | Unicycling Web Page:
| http://nimitz.mcs.kent.edu/~bkonarsk/
-------------------------------------------------------------------------------
Technical Details
Message-ID:
<3o0hfa$3ev@ns.mcs.kent.edu>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3mpj9f$d1h@csnews.cs.colorado.edu> <jerry.798231458@tivoli.com> <3n8qt8$shf@smurf.noris.de> <D7uvo0.348@midway.uchicago.edu>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10259a,c6417ab4174dabc8 X-Google-Attributes: gid10259a,public X-Google-Thread: 1025b4,4df32fd703a6b724 X-Google-Attributes: gid1025b4,public X-Google-Thread: 1012a6,4df32fd703a6b724 X-Google-Attributes: gid1012a6,public From: bkonarsk@condor.mcs.kent.edu (Beirne Konarski) Subject: Re: Gawk v24.7: Why Bother??? Date: 1995/04/30 Message-ID: <3o0hfa$3ev@ns.mcs.kent.edu> X-Deja-AN: 101743639 references: <3mpj9f$d1h@csnews.cs.colorado.edu> <jerry.798231458@tivoli.com> <3n8qt8$shf@smurf.noris.de> <D7uvo0.348@midway.uchicago.edu> followup-to: comp.unix.shell,gnu.misc.discuss,comp.lang.perl organization: Kent State University, Dept. of Math and CS newsgroups: comp.unix.shell,gnu.misc.discuss,comp.lang.perl