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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Ada Successor Language Date: Fri, 29 Jun 2018 09:20:38 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <5e86db65-84b9-4b5b-9aea-427a658b5ae7@googlegroups.com> <87fu1izfgs.fsf@nightsong.com> <878t75nwad.fsf@adaheads.home> <15b6f89f-997b-45ac-86b4-2e614bb624c2@googlegroups.com> <28a46046-e7eb-4306-bc39-72bc751831ae@googlegroups.com> <400ba7f8-6875-4ba8-99ee-c105180d5d8b@googlegroups.com> <87tvpm1e2q.fsf@nightsong.com> NNTP-Posting-Host: MyFhHs417jM9AgzRpXn7yg.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 X-Notice: Filtered by postfilter v. 0.8.3 Content-Language: en-US Xref: reader02.eternal-september.org comp.lang.ada:53423 Date: 2018-06-29T09:20:38+02:00 List-Id: On 2018-06-29 05:11, Paul Rubin wrote: > "Dan'l Miller" writes: >> bad idea that threatens to bring C++ slicing to Ada > > Are you talking about this? > > https://en.wikipedia.org/wiki/Object_slicing > > Does Ada somehow escape from it now? Sure, there is no way to reconstruct that in Ada. > It does sound bad. Only due to C++ design fault. Assignment is a classic multiple dispatch operation (a multi-method). C++ per design does no support MD. Here you go. With MD it is no more an issue. Let T and S be two types T <: S. The assignment operation of mixed arguments and result ":=" : S x T -> S could not be safely inherited by S from T's: ":=" : T x T -> T Therefore the compiler would ask the programmer to override it (or redesign). Problem solved. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de