comp.lang.ada
 help / color / mirror / Atom feed
From: Bill Findlay <findlaybill@blueyonder.co.uk>
Subject: Re: Latest suggestion for 202x
Date: Sat, 22 Jun 2019 19:34:44 +0100
Date: 2019-06-22T19:34:44+01:00	[thread overview]
Message-ID: <0001HW.22BEAC44019B6BBC70000B1932EF@news.individual.net> (raw)
In-Reply-To: lnr27likgv.fsf@kst-u.example.com

On 22 Jun 2019, Keith Thompson wrote
(in article <lnr27likgv.fsf@kst-u.example.com>):

> "Dmitry A. Kazakov"<mailbox@dmitry-kazakov.de>  writes:
> > On 2019-06-21 22:24, Keith Thompson wrote:
> > > "Dmitry A. Kazakov"<mailbox@dmitry-kazakov.de>  writes:
> > > > On 2019-06-21 20:12, Keith Thompson wrote:
> > > > > I *can't* replace A by a function without modifying the code that uses
> > > > > it.
> > > >
> > > > In short if I can't do something then I don't need it, sour grapes...
> > > >
> > > > > I suppose containers weaken that argument
> > > >
> > > > No, it is no argument regardless.
> > > >
> > > > If Ada has problems with array abstraction, and it has, that is
> > > > irrelevant to the point that this is the *same* abstraction.
> > > >
> > > > A language that syntactically distinguish array calls and function calls
> > > > breaks the abstraction or lacks it completely.
> > >
> > > Is breaking that abstraction such a bad thing?
> >
> > Yes, because abstraction is useful. Arrays have no "physical"
> > meaning. It is always an artifact of software design, some
> > implementation detail, not to expose.
> >
> > > Why *should* array
> > > indexing and function calls be treated as the same thing?
> >
> > Because they model the same thing, a mapping, when arrays come in
> > consideration.
>
> I disagree. Array indexing operations refer to elements of an array
> object. Function calls yield a value, and can have side effects.

They are not exactly the same, but similar enough.
This is/was known as "uniform referent notation".
I take the pragmatic view that it can be very handy.

> > > What about record component selection?
> >
> > Same. It is not mapping of ordered 1st class object to 1st class
> > object in this case, but surely the syntax sugar of record member
> > selection must be same for records and functions. And it is, since Ada
> > 2005 started to support dotted notation:
> >
> > R.X -- Record member *or* call to primitive X of R or ...
>
> So would you prefer "R.X" to be written as "R(X)" (or perhaps "X(R)")?

X(R) is exactly how it was written in ALGOL W
(to get a field of the record pointed to by R,
as there were no off-heap records).

In Pascal f^ could be either data in the buffer
of file f or data referenced by a pointer f.
When I converted some s/w from 1900 Pascal to 2900 Pascal,
all the accesses to filed data became accesses to data
in virtual memory without changing the source code.

-- 
Bill Findlay

  reply	other threads:[~2019-06-22 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 [this message]
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
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