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=-3.2 required=3.0 tests=BAYES_00,NICE_REPLY_A, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R.Carter" Newsgroups: comp.lang.ada Subject: Re: Calling inherited primitive operations in Ada Date: Fri, 2 Sep 2022 12:41:42 +0200 Organization: A noiseless patient Spider Message-ID: References: <67b32db0-c4db-466c-ac13-e597e008c762n@googlegroups.com> <401d6f59-2c28-4dd5-9fa6-fccf33b6d645n@googlegroups.com> <12cc33b1-2c39-4057-8a03-623064b06e8en@googlegroups.com> <672e9bc6-1e53-42cb-a339-9230ab949de9n@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 2 Sep 2022 10:41:42 -0000 (UTC) Injection-Info: reader01.eternal-september.org; posting-host="6ac1cbe18cfe3e0fa2de74f64dfd3996"; logging-data="2646748"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+X49bXHNNbVkoyzfk0bxCR9g7iTByZsTs=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Cancel-Lock: sha1:G/PLmxQqTtAFnWy5IUOLnJZSeFg= In-Reply-To: <672e9bc6-1e53-42cb-a339-9230ab949de9n@googlegroups.com> Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:64269 List-Id: On 2022-09-02 10:35, amo...@unizar.es wrote: > > Going in a tangent, and I guess you know perfectly well, but this is caused by the painful duplication of code that Ada pushes you to by not having a native way to abstract storage of definite vs indefinite types. So the provider of a generic library very soon faces this conundrum about duplicating most interfaces, if not implementations, or resort to non-trivial generics, or accept an unnecessary penalty for definite types, or push to the client the definite storage matter. There's simply no satisfying solution here [that I know of]. The duplication of every standard container to have both [in]definite variants is a strong indictment. The only indefinite data structure that is needed seems to be holders. Any other indefinite data structure can be implemented as the equivalent definite data structure of holders, so there need be no duplication of implementations. That one cannot use a single pkg for both does result in duplication of the spec, but that seems like less of an issue to me. -- Jeff Carter "Apple juice and Darvon is fantastic together." Play It Again, Sam 127