🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.shell
Article #4607

Re: Gawk v24.7: Why Bother???

#4607
From: Tom Christiansen
Date: Thu, 27 Apr 1995 00:00
40 lines
2471 bytes
In comp.lang.perl, 
    cbbrown@io.org (Christopher B. Browne) writes:
:In article <3nlngt$981@mudraker.mtholyoke.edu>,
:Jurgen Botz <jbotz@mtholyoke.edu> wrote:
:>In article <3nk1f4$8ld@ionews.io.org>,
:>Christopher B. Browne <cbbrown@io.org> wrote:
:>>Certainly gawk is cheaper than Perl, but if you add associative
:>>arrays, [...]
:>
:>My understanding of awk (which is minimal, I use Perl) is that it has
:>alway had associative arrays.
:
:I've been getting corrected repeatedly by email; I was perhaps not
:sufficiently precise about this.
:
:Yes, awk and gawk and nawk and mawk have associative arrays.  awk
:had them before Perl was a glimmer in Larry Wall's eye, no doubt.
:
:What I *meant* to say was "DBM files," which happen to be a way of
:binding associative arrays to external files.  This is one area
:where Perl definitely beats awk (although I wouldn't mind having
:an alternative implementation that uses something like splay
:trees instead of hash tables, thus providing the ordering
:property that is often useful), and an example of something mentioned 
:as a desired feature of "super-duper-gawk."

Well, perl already has that too.  Just tie to a Berkeley DB set of methods
rather than an NDBM set of them (which is done dynamically at run time)
and you can if you want specify an ordering.  If fact, you can do this for
a memory-only object as well, thus providing an access order for any
associative array.

Next request? :-)

--tom
-- 
Tom Christiansen      Perl Consultant, Gamer, Hiker      tchrist@mox.perl.com
"L'extension des privileges des femmes est le principe general de tous
 progres sociaux."
    --Charles Fourier, 1808
Technical Details
Message-ID: <3nobpb$std@csnews.cs.colorado.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3n8qt8$shf@smurf.noris.de> <3nk1f4$8ld@ionews.io.org> <3nlngt$981@mudraker.mtholyoke.edu> <3nmbk6$t7g@ionews.io.org>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1012a6,4df32fd703a6b724
X-Google-Attributes: gid1012a6,public
X-Google-Thread: 1025b4,4df32fd703a6b724
X-Google-Attributes: gid1025b4,public
X-Google-Thread: 10259a,c6417ab4174dabc8
X-Google-Attributes: gid10259a,public
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: Gawk v24.7: Why Bother???
Date: 1995/04/27
Message-ID: <3nobpb$std@csnews.cs.colorado.edu>
X-Deja-AN: 101597229
references: <3n8qt8$shf@smurf.noris.de> <3nk1f4$8ld@ionews.io.org> <3nlngt$981@mudraker.mtholyoke.edu> <3nmbk6$t7g@ionews.io.org>
organization: Perl Consulting and Training
reply-to: tchrist@mox.perl.com (Tom Christiansen)
newsgroups: comp.unix.shell,gnu.misc.discuss,comp.lang.perl
originator: tchrist@mox