From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Proposal: Auto-allocation of Indefinite Objects Date: Sat, 22 Aug 2020 23:52:30 -0500 Organization: JSA Research & Innovation Message-ID: References: <8a502b6c-4609-4cd8-b292-5797fe6421e1n@googlegroups.com> Injection-Date: Sun, 23 Aug 2020 04:52:31 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="11142"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader01.eternal-september.org comp.lang.ada:59784 List-Id: "Dmitry A. Kazakov" wrote in message news:rhnqip$bga$1@gioia.aioe.org... > On 21/08/2020 01:33, Randy Brukardt wrote: >> "Dennis Lee Bieber" wrote in message >> news:mkmtjflufgmatkk3hp25nvk2hoogun1fis@4ax.com... >>> On Thu, 20 Aug 2020 19:49:44 +0200, "Dmitry A. Kazakov" >>> declaimed the following: >>> >>>> >>>> But records and arrays are needed as building blocks of containers. How >>>> would you get rid of them? >>> >>> And likely needed for any embedded or low-level work where they are >>> mapped to things like (GP) I/O ports or such... >> >> Yes, a fixed vector container would be needed for interfacing (probably >> wouldn't use it for anything else). But there's no reason that can't be >> provided as a container, so long as representation guarentees (esp. >> Component_Size) are included. Remember that containers (in Ada 202x) have >> indexing, aggregates, and all of the useful basic operations. The stuff >> that's missing is the same stuff that adds a vast amount of complexity to >> Ada (and possibilities for bugs) - hardly anyone would miss it. > > Really? I would miss array conversions, slices, equivalence of same length > index ranges, constrained array subtypes etc. Those things are mostly useful for making work for programmers. Note that I'm assuming that Strings are a completely separate abstraction - a UTF-8 string is not an array and shouldn't be treated as one. (Indexing of individual characters being very expensive.) Fixed constrained arrays would be available for interfacing (they're not really useful for much else). Note that a bounded vector is allocated statically, so there's no extra cost to using it (unlike an unbounded vector or string). Randy.