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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: How to hide inherited implementation of a public interface? Date: Sat, 22 Mar 2014 09:31:56 +0100 Organization: cbb software GmbH Message-ID: <1302npsqvdkko.1uwmf53e7dhkn$.dlg@40tude.net> References: <1goz7i2pg8860.1kma3d5vz1fl$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: cTj7CVEwmZyjrFPUnpIvWg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:18914 Date: 2014-03-22T09:31:56+01:00 List-Id: On Fri, 21 Mar 2014 18:02:28 -0500, Randy Brukardt wrote: > Full multiple inheritance CAN be implemented, but it's expensive enough in > compiler and language complexity that the costs outweight the value. In the real-life project lack I am working on of proper MI led to a massive cut-and-paste code explosion on the scale 1 to 1000, at least. > The > halfway Java-like solution is easier to implement but makes no one happy. We > should have told the multiple inheritance nuts to forget it, because it > makes no sense for Ada. MI is not a language property, it is more of software design. You cannot get rid of the fact that software engineers will keep on trying to reuse code, sharing the code implementing file reading in the code of read-only and read-write files. This is a sound design. It is the opposite [*] that does not make sense. If the language does not support sound software design decisions, well, that is what we call a language flaw. ------------ * The standard library is full of flaws caused by not using MI. From minor issues that Root_Stream_Type does not implement Limited_Controled, to massive mess that Character and Wide_Character to don't share common interface. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de