comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: FAQ and string functions
Date: Thu, 15 Aug 2002 14:24:04 -0500
Date: 2002-08-15T14:24:04-05:00	[thread overview]
Message-ID: <ulnvss8u0g9cfc@corp.supernews.com> (raw)
In-Reply-To: uwuqt198g.fsf@gsfc.nasa.gov

Stephen Leake wrote in message ...
>"Randy Brukardt" <randy@rrsoftware.com> writes:
>
>> In any case, as with many other "containers" issues, I don't see the
>> point. There is no advantage to even having a "unbounded arrays"
>> package, as an access to an array works fine, and there is little
>> advantage to the package (only an avoidance of memory leaks, easy to
>> avoid in this case).
>
>I disagree. There are many little details about containers that you
>have to get right, and I prefer to just get them right once, and test
>them just once.


This is certainly true, but in many cases, it occurs because you are
building a general purpose library rather than something for a specific
use. That is certainly true in Claw, I'd say about 1/3 of the code is
"protection against user errors" which is simply not included in code
created for a specific use (and need not be).

>Since I wrote the SAL containers, I have reused them many times, and
>been very pleased that I did not have to rewrite and retest them.
>There are 852 lines (comments and whitespace included) in
>SAL.Poly.Lists.Double; that's big enough to be worth saving and
>reusing.


But how much of that do you actually use in your apps? My uses of lists
generally use only a handleful of operations: Declare the types (four
lines specifically for the list); Iterate (one line plus loop),
Allocate/insert at head (one line), Deallocate all (five lines), and
(more rarely) Insert at specific location or tail (seven lines). Only
the last is at all complicated. (Note that access to the items is not
included, because .all is automatically inserted by Ada -- so it
includes no code whatsoever.) I doubt that any list package is going to
save any effort here, particularly because it complicates the access to
the items so severely.

I want to make it clear that this does *not* apply to more complicated
containers like Maps, which I would probably use if I had them.

>People should be aware of data structures, but I feel they should not
>have to recreate them; they should be able to reuse them.


I disagree. This is the same principle as knowing how to divide numbers
(it is *not* pushing the divide key on your calculator) and knowing
about assembler/machine language (so that programmers have an
understanding of what is expensive and what is cheap). Everyone needs to
know how to recreate them;
its important to know how they are implemented in order to choose the
best one for the job.

...
>> But I suppose I am getting to be an old fuddy duddy in this way. I
>> recall thinking how annoying old programmers were when I first
>> started working on Janus/Ada; now (nearly 22 years later), I sound
>> like them. Sigh. Probably should go bag groceries. :-)
>
>No need to go that far. Just alow us to disagree :).


I might allow that. :-)

               Randy.






  reply	other threads:[~2002-08-15 19:24 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-30  6:32 FAQ and string functions Oleg Goodyckov
2002-07-30  8:52 ` Colin Paul Gloster
2002-07-30 13:48 ` Ted Dennison
2002-07-31  4:52   ` Brian May
2002-08-01 16:09     ` Ted Dennison
2002-08-02  0:21       ` Brian May
2002-08-02  1:56         ` tmoran
2002-08-02 13:59         ` Ted Dennison
2002-07-31  7:46   ` Oleg Goodyckov
2002-07-31  9:04     ` Lutz Donnerhacke
2002-07-31  9:39       ` Pascal Obry
2002-07-31 15:06         ` Oleg Goodyckov
2002-07-31 16:50       ` Oleg Goodyckov
2002-07-31 20:16     ` Simon Wright
2002-07-31 20:56       ` Robert A Duff
2002-08-01  0:11         ` Darren New
2002-08-01  1:08           ` tmoran
2002-08-01  9:25           ` Brian May
2002-08-01 11:20           ` Oleg Goodyckov
2002-08-01 15:43             ` Darren New
2002-08-01 21:37               ` Robert A Duff
2002-08-03  0:42                 ` Ted Dennison
2002-08-03 13:51                   ` Robert A Duff
2002-08-03 16:43                   ` Darren New
2002-08-05 13:37                   ` Stephen Leake
2002-08-02  8:01               ` Oleg Goodyckov
2002-08-02 16:09                 ` Darren New
2002-08-01 11:09         ` Oleg Goodyckov
2002-08-01 14:08           ` Frank J. Lhota
2002-08-01 15:06             ` Robert A Duff
2002-08-01 16:05             ` Oleg Goodyckov
2002-08-01 14:57         ` Georg Bauhaus
2002-07-31 22:04     ` Dmitry A.Kazakov
2002-07-31 15:23       ` Oleg Goodyckov
2002-08-01 21:57         ` Dmitry A.Kazakov
2002-08-01 13:10           ` Oleg Goodyckov
2002-08-02 23:29             ` Dmitry A.Kazakov
2002-08-02 16:35               ` Oleg Goodyckov
2002-08-05 11:50                 ` Dmitry A. Kazakov
2002-08-05 14:29                   ` Larry Kilgallen
2002-08-05 14:57                     ` Dmitry A. Kazakov
2002-08-05 15:12                   ` Oleg Goodyckov
2002-08-05 16:20                   ` Darren New
2002-08-05 17:01                     ` Georg Bauhaus
2002-08-05 17:48                       ` Darren New
2002-08-05 19:06                         ` tmoran
2002-08-05 20:08                           ` Darren New
     [not found]                     ` <slrnakv3q9.p2.lutz@taranis.iks-jena.de>
     [not found]                       ` <3D4FEFCB.3B74F5E5@san.rr.com>
2002-08-14  0:07                         ` Randy Brukardt
2002-08-01 14:29     ` Ted Dennison
2002-08-01 16:47       ` Oleg Goodyckov
2002-08-02 14:05         ` Ted Dennison
2002-08-02 16:11           ` Darren New
2002-08-03  0:30             ` Ted Dennison
2002-08-03  0:58               ` Darren New
2002-08-03  2:04                 ` Dale Stanbrough
2002-08-03  2:32                 ` Ted Dennison
2002-08-03  2:47                   ` Darren New
2002-08-03 12:41                     ` Ted Dennison
2002-08-03 16:53                       ` Darren New
2002-08-04  1:08                         ` Ted Dennison
2002-08-04 16:23                           ` Darren New
2002-08-05  2:16                             ` Robert Dewar
2002-08-05  3:45                               ` Darren New
2002-08-05  9:56                     ` Lutz Donnerhacke
2002-08-05 16:02                       ` Darren New
2002-08-14  0:42                         ` Randy Brukardt
2002-08-14  1:45                           ` Darren New
2002-08-14 19:37                             ` Randy Brukardt
2002-08-14 20:25                               ` Stephen Leake
2002-08-14 20:22                           ` Stephen Leake
2002-08-15 19:24                             ` Randy Brukardt [this message]
     [not found]                         ` <jb1vkustkugeutalhvrhv1n0k9hqn2fpip@4ax.com>
     [not found]                           ` <3D4FF351.8F4A6C0A@san.rr.com>
2002-08-14  1:03                             ` Randy Brukardt
2002-08-14  1:05                       ` Robert A Duff
     [not found]                       ` <3D4EA1AC.80D17170@s <wccofc6b66u.fsf@shell01.TheWorld.com>
2002-08-14 20:29                         ` Stephen Leake
2002-08-26 17:53                           ` Robert A Duff
2002-08-26 18:40                             ` Chad R. Meiners
2002-08-26 18:52                               ` Robert A Duff
2002-08-26 21:46                                 ` Chad R. Meiners
2002-08-05 13:29                     ` Stephen Leake
2002-08-03  5:07                   ` achrist
2002-08-03 12:52                     ` Ted Dennison
2002-08-05 15:34                       ` Ted Dennison
2002-08-05 13:24                 ` Stephen Leake
2002-08-05 16:02                   ` Darren New
2002-08-05  7:18           ` Oleg Goodyckov
2002-08-02  1:04     ` tmoran
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox