From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: class wide iterable (and indexable)
Date: Wed, 23 Jan 2019 19:00:08 +0100
Date: 2019-01-23T19:00:08+01:00 [thread overview]
Message-ID: <q2aa38$hke$1@dont-email.me> (raw)
In-Reply-To: <q283tp$6tj$1@franka.jacob-sparre.dk>
On 1/22/19 11:02 PM, Randy Brukardt wrote:
>
> They're not used more often because this fixes the length, and prevents
> operations on items with different lengths. Again, a string is not an
> array -- a Vector is a better model for a string.
I suspect we're talking about 2 different things.
The length is fixed just as it is for all array objects. I'm talking about a way
to get arrays (current Ada meaning) with a fixed lower bound. Things with a
variable length are something else altogether.
I used String simply because it was a convenient array type to use in the
example. This made the example easier to understand because it didn't need an
extra type definition that is irrelevant to explaining the concept.
I'm not discussing whether this is a useful implementation for strings. (A
string is a sequence of characters, and one use of an array is sequences, so an
array may be a suitable implementation for a string. I suspect many of your
problems with strings are really problems with characters.)
With all that understood (I hope), I can restate my question as: Why do those
who use arrays, and have difficulty with them having variable lower bounds, not
use such constructs more often instead? Is it because the value of having
constant indices across slices outweighs the negatives of variable lower bounds?
--
Jeff Carter
"This scene's supposed to be in a saloon, but
the censor cut it out. It'll play just as well
this way." [in a soda fountain]
Never Give a Sucker an Even Break
113
next prev parent reply other threads:[~2019-01-23 18:00 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-02 15:48 class wide iterable (and indexable) George Shapovalov
2019-01-02 17:39 ` Simon Wright
2019-01-02 18:11 ` George Shapovalov
2019-01-03 8:52 ` Simon Wright
2019-01-03 9:30 ` George Shapovalov
2019-01-03 16:45 ` Jeffrey R. Carter
2019-01-04 4:32 ` Shark8
2019-01-05 9:03 ` Randy Brukardt
2019-01-03 22:56 ` Randy Brukardt
2019-01-04 0:00 ` George Shapovalov
2019-01-04 8:43 ` Dmitry A. Kazakov
2019-01-04 12:20 ` George Shapovalov
2019-01-05 23:29 ` Jere
2019-01-05 23:50 ` Jere
2019-01-06 9:34 ` George Shapovalov
2019-01-06 10:19 ` Dmitry A. Kazakov
2019-01-06 11:30 ` George Shapovalov
2019-01-06 12:45 ` Dmitry A. Kazakov
2019-01-06 13:18 ` George Shapovalov
2019-01-06 14:13 ` Dmitry A. Kazakov
2019-01-06 16:33 ` George Shapovalov
2019-01-06 18:29 ` George Shapovalov
2019-01-06 20:32 ` Dmitry A. Kazakov
2019-01-06 21:47 ` George Shapovalov
2019-01-07 9:37 ` Niklas Holsti
2019-01-07 16:24 ` George Shapovalov
2019-01-06 20:18 ` Dmitry A. Kazakov
2019-01-06 21:58 ` George Shapovalov
2019-01-07 8:28 ` Dmitry A. Kazakov
2019-01-05 9:21 ` Randy Brukardt
2019-01-05 10:07 ` Dmitry A. Kazakov
2019-01-05 18:17 ` George Shapovalov
2019-01-05 20:07 ` Simon Wright
2019-01-05 20:41 ` George Shapovalov
2019-01-07 21:07 ` Randy Brukardt
2019-01-08 9:51 ` Dmitry A. Kazakov
2019-01-08 19:25 ` Björn Lundin
2019-01-08 23:26 ` Randy Brukardt
2019-01-09 17:06 ` Dmitry A. Kazakov
2019-01-09 23:38 ` Randy Brukardt
2019-01-10 8:53 ` Dmitry A. Kazakov
2019-01-10 22:14 ` Randy Brukardt
2019-01-11 9:09 ` Dmitry A. Kazakov
2019-01-14 22:59 ` Randy Brukardt
2019-01-15 9:34 ` Dmitry A. Kazakov
2019-01-18 15:48 ` Olivier Henley
2019-01-18 16:08 ` Dmitry A. Kazakov
2019-01-18 16:29 ` Olivier Henley
2019-01-18 16:54 ` Dmitry A. Kazakov
2019-01-18 17:31 ` Olivier Henley
2019-01-18 18:51 ` Shark8
2019-01-18 20:09 ` Dmitry A. Kazakov
2019-01-21 23:15 ` Randy Brukardt
2019-01-22 8:56 ` Dmitry A. Kazakov
2019-01-22 22:00 ` Randy Brukardt
2019-01-23 8:14 ` Dmitry A. Kazakov
2019-01-22 17:04 ` Jeffrey R. Carter
2019-01-22 22:02 ` Randy Brukardt
2019-01-23 18:00 ` Jeffrey R. Carter [this message]
2019-01-23 20:14 ` Shark8
2019-01-23 22:47 ` Randy Brukardt
2019-01-24 17:11 ` Dmitry A. Kazakov
2019-01-28 15:54 ` Shark8
2019-01-28 17:23 ` Dmitry A. Kazakov
2019-01-08 18:32 ` G. B.
2019-01-05 17:05 ` Jeffrey R. Carter
2019-01-05 20:18 ` Dmitry A. Kazakov
2019-01-05 21:09 ` Shark8
2019-01-06 10:11 ` Jeffrey R. Carter
2019-01-05 20:46 ` Shark8
2019-01-06 9:43 ` Dmitry A. Kazakov
2019-01-26 22:11 ` George Shapovalov
2019-01-26 22:14 ` George Shapovalov
-- strict thread matches above, loose matches on Subject: below --
2019-01-29 7:45 Randy Brukardt
2019-01-29 19:34 ` Niklas Holsti
2019-01-29 20:26 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox