comp.lang.ada
 help / color / mirror / Atom feed
From: Optikos <optikos@verizon.net>
Subject: Re: Latest suggestion for 202x
Date: Sun, 23 Jun 2019 11:34:06 -0700 (PDT)
Date: 2019-06-23T11:34:06-07:00	[thread overview]
Message-ID: <5fed1874-ab88-41a6-8da2-723756f73d53@googlegroups.com> (raw)
In-Reply-To: <qena9l$hpt$1@dont-email.me>

On Sunday, June 23, 2019 at 2:38:31 AM UTC-5, G.B. wrote:
> On 22.06.19 20:37, Dmitry A. Kazakov wrote:
> >> I disagree.  Array indexing operations refer to elements of an array
> >> object.  Function calls yield a value, and can have side effects.
> > 
> > So can array indexing, when you get a copy of an array element, its construction may do whatever you wanted, e.g. spawn format c: /q.
> 
> The way in which your argument is composed is not really doing justice
> to the original ideas of array and record, I think.
> 
> It is fusing features of almost different languages, to no avail
> (other than formalism).
> 
> The original *ideas* of array and record are fairly simple:
> store plain old data objects somewhere, by index or by name.
> No fancy effects.
> 
> Your argument then invokes not-so-simple and later ideas of object
> construction and its operations. These would become associated with array
> components, but also with any other object. Hence, not specifically
> with arrays.
> 
> I think it is a better idea to conceive of Ada arrays as low
> level representational types. Arrays should only exist in private parts,
> or bodies.

I concur.  A modern backwards-compatibility-breaking course-correction of Ada would strictly enforce this prohibition of arrays outside of private.  It would do this as part of dismantling what was in vogue prior to 1980 but has not weathered the test of time due to Ada80 and Ada83 paying far too much homage to legacy languages prior to 1980.  (Thank goodness that Ada did not need to purge PL/1-esque nesting-level numbers from its records as CHILL eventually needed to do, as a hideous example of paying too much homage to one of the worst ideas in PL/1.)

> So, when there is a need to design some interface, re-inventing
> arrays will not be the optimal starting point. Traditional arrays
> are far too simplistic and universal. They therefore cannot express
> specific requirements. Such as:
> * Random-Access,

Since array indexing is already random access, I assume that you mean:  clearly differentiating O(1) random-access from O(log n) logarithmic search from O(n) linear search and so forth.  With the exception of the obviously-generalized f(x) notation (whose very nature says that this function's functionality could be from anything anywhere in the wide world of mathematics), it has always annoyed me that various languages (e.g., the STL-C++-influenced ones; the SNOBOL-influenced ones) abuse the Algol58 [ ] random-access array notation for non-random-access associative searches, such as non-vector containers in C++' s STL and in SNOBOL's tables.  Sloppy† programmers then don't think through the big-Omicron (a.k.a. big-O) Landau-notation growth rates accumulating from innermost to outermost nesting of data-structures and/or of loops.

† which is most of them nowadays

> * Independent-Components,
> * Sparse,
> * Associating<K, V> where K in I'Class and ...
> * ...
> 
> A user defined operator

I would use the plural there:  separate operators (or some sort of obvious visual clue) for different kinds of access other than random-access dense arrays, assuming that f(x) notation is not utilized for arrays, because f(x) notation says to any mathematician-minded programmer that all assumptions of what f(x) is might not be true until further inspection

> for "Element Access" then becomes a distinct subject,
> and a distinct opportunity.


  parent reply	other threads:[~2019-06-23 18:34 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-15 23:59 Latest suggestion for 202x Micah Waddoups
2019-06-16  5:14 ` Jerry
2019-06-16  7:17 ` Dmitry A. Kazakov
2019-06-16 10:22 ` Egil H H
2019-06-16 16:54   ` Maciej Sobczak
2019-06-16 20:09     ` Dmitry A. Kazakov
2019-06-17  6:54     ` Egil H H
2019-06-17  7:42       ` J-P. Rosen
2019-06-17 12:01     ` Mart van de Wege
2019-06-17 13:35       ` Maciej Sobczak
2019-06-17 15:20         ` Dmitry A. Kazakov
2019-06-17 15:32           ` Paul Rubin
2019-06-17 16:43             ` Dmitry A. Kazakov
2019-06-17 21:38           ` Keith Thompson
2019-06-18 15:48             ` Jeffrey R. Carter
2019-06-20 22:21             ` Randy Brukardt
2019-06-21  9:42               ` Dmitry A. Kazakov
2019-06-21 18:12                 ` Keith Thompson
2019-06-21 18:43                   ` Dmitry A. Kazakov
2019-06-21 20:24                     ` Keith Thompson
2019-06-22  6:54                       ` Dmitry A. Kazakov
2019-06-22  8:43                         ` Randy Brukardt
2019-06-22  9:00                           ` Dmitry A. Kazakov
2019-06-22 17:44                         ` Keith Thompson
2019-06-22 18:34                           ` Bill Findlay
2019-06-22 18:37                           ` Dmitry A. Kazakov
2019-06-23  7:38                             ` G.B.
2019-06-23  8:29                               ` Dmitry A. Kazakov
2019-06-23 18:34                               ` Optikos [this message]
2019-06-23 19:20                                 ` Dennis Lee Bieber
2019-06-22 20:48                           ` Optikos
2019-06-22 20:53                             ` Optikos
2019-06-23 17:42                             ` Dennis Lee Bieber
2019-06-24  5:07                               ` J-P. Rosen
2019-06-24  5:40                                 ` Paul Rubin
2019-06-24  7:16                                   ` Niklas Holsti
2019-06-26 18:00                                     ` Stephen Leake
2019-06-24 13:07                                   ` J-P. Rosen
2019-06-24 11:12                                 ` Stefan.Lucks
2019-06-24 12:06                                   ` Niklas Holsti
2019-06-24 20:22                                     ` Randy Brukardt
2019-06-24 20:32                                       ` Keith Thompson
2019-06-24 20:47                                       ` Jeffrey R. Carter
2019-06-24 13:10                                   ` J-P. Rosen
2019-06-22  8:36                   ` Randy Brukardt
2019-06-22 17:39                     ` Keith Thompson
2019-06-16 19:34 ` Optikos
2019-06-16 20:10   ` John Perry
2019-06-16 20:57     ` Optikos
2019-06-16 21:36       ` Dmitry A. Kazakov
2019-06-17 16:48     ` G. B.
2019-06-17 17:12     ` Paul Rubin
2019-06-16 21:41 ` Lucretia
2019-06-19  2:36 ` Micah Waddoups
2019-06-19 11:14   ` Lucretia
2019-06-19 11:45     ` briot.emmanuel
2019-06-19 14:34       ` Optikos
2019-06-19 19:29         ` Lucretia
2019-06-19 16:12   ` G. B.
2019-06-23 20:17 ` Per Sandberg
replies disabled

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