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.7 required=3.0 tests=BAYES_00,NICE_REPLY_A, REPLYTO_WITHOUT_TO_CC,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "G.B." Newsgroups: comp.lang.ada Subject: Re: on Ada abtract data type vs. OOP. Date: Sun, 11 Sep 2022 10:02:48 +0200 Organization: A noiseless patient Spider Message-ID: References: Reply-To: nonlegitur@notmyhomepage.de MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 11 Sep 2022 08:02:49 -0000 (UTC) Injection-Info: reader01.eternal-september.org; posting-host="9a7357c6730c52712ac56f32ec4efa32"; logging-data="1965848"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+bt+7Pr7Bsrc4/BJLAysXZqnWZBFMBYHw=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.13.0 Cancel-Lock: sha1:2PxD9wrSCYDRTjJbZkgK3nyGCRE= In-Reply-To: Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:64314 List-Id: On 09.09.22 17:06, antispam@math.uni.wroc.pl wrote: > In OO there is > dispatch mechanizm which _at runtime_ decides which Push to > call. In Ada you normally have overloading. Tagged types > use OO dispatch. To see difference runtime type must be > different than statically determined type, this is possible > due to inheritance. Without inheritance diffences are > trivial. Agreed, except dynamic vs static determination of the callable thing. In Ada, O.Push (5) means determination of the specific Push at compile time whenever the specific type of O is known. You need class-wide operands for this choice to be made at run time. C++ has a similar feature, I think.