From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Bill Findlay Newsgroups: comp.lang.ada Subject: Re: Latest suggestion for 202x Date: Sat, 22 Jun 2019 19:34:44 +0100 Message-ID: <0001HW.22BEAC44019B6BBC70000B1932EF@news.individual.net> References: <728c4668-8fa0-4a57-a502-2bf476fc3940@googlegroups.com> <4908c3e3-18dc-4953-bf26-46f160d2ebfd@googlegroups.com> <9dcf22a2-2255-4089-b1f0-93e31448415e@googlegroups.com> <86h88obeu0.fsf@gaheris.avalon.lan> <39e749cd-de5c-44fa-b8ec-50d36f3bd52c@googlegroups.com> Reply-To: findlaybill@blueyonder.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: individual.net JKI6c02NyVp2F+iMVGuilAlX1/Dr5erqjN09vBcWDU3Sc3V5f3 X-Orig-Path: not-for-mail Cancel-Lock: sha1:C9z5u1xSvAxboqTKSRlmGc7Yb/I= User-Agent: Hogwasher/5.20 Xref: reader01.eternal-september.org comp.lang.ada:56714 Date: 2019-06-22T19:34:44+01:00 List-Id: On 22 Jun 2019, Keith Thompson wrote (in article ): > "Dmitry A. Kazakov" writes: > > On 2019-06-21 22:24, Keith Thompson wrote: > > > "Dmitry A. Kazakov" 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