From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,T_SCC_BODY_TEXT_LINE, XPRIO autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: New aggregates with Ada 2022. Date: Wed, 22 Jun 2022 20:06:53 -0500 Organization: A noiseless patient Spider Message-ID: References: Injection-Date: Thu, 23 Jun 2022 01:06:55 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="3391b7818b792a0e7a169185c1208738"; logging-data="24558"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18XRSMx4PVXNY0/wvwBcbK/YQPf2Y5TkAo=" Cancel-Lock: sha1:hv5hnB/130zcgLJlYtUMtw/3CQI= X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 X-RFC2646: Format=Flowed; Response X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-Priority: 3 X-MSMail-Priority: Normal Xref: reader02.eternal-september.org comp.lang.ada:64015 List-Id: "Dmitry A. Kazakov" wrote in message news:t8ulu9$jca$1@gioia.aioe.org... > On 2022-06-22 01:28, Randy Brukardt wrote: ... > Well, I can give a useful example straight away. A string has two array > interfaces, the encoding and the character view. The former must be a > built-in array. The interface for a string should be quite different from that for an array, they're not related at all. One might implement a string with a record type that has an array component, but never as a bare array. (That leads to nonsense, which Ada sadly has proven clearly. Indeed, if you consider everything to have an interface, arrays themselves cease to be a fundemental part of a language design and just become another interface. (How something gets implemented should not be part of a language design, so long as the design does not prevent an efficient implementation.) I certainly would not treat them as special in any way, just a series of function calls. (Possibly records could be treated that way as well, although it is less clear that an efficient implementation is possible for them.) Randy. Randy.