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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2ff5c149712ec0eb X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!out02a.usenetserver.com!news.usenetserver.com!in04.usenetserver.com!news.usenetserver.com!feed.cgocable.net!meganewsservers.com!feeder2.on.meganewsservers.com!195.62.97.14.MISMATCH!newsfeed0.kamp.net!newsfeed.kamp.net!213.239.142.2.MISMATCH!feed.xsnews.nl!border-1.ams.xsnews.nl!tudelft.nl!txtfeed1.tudelft.nl!feeder1.cambrium.nl!feed.tweaknews.nl!news.netcologne.de!nhp.netcologne.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Ada Interfaces and the Liskov Substitution Principle From: Georg Bauhaus In-Reply-To: <12h6mi42jcha0.7f9vfsnihjwr$.dlg@40tude.net> <1179953657.839272.160320@a26g2000pre.googlegroups.com> <1179991769.376381.252010@m36g2000hse.googlegroups.com> <12h6mi42jcha0.7f9vfsnihjwr$.dlg@40tude.net> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1180003336.1163.29.camel@kartoffel> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Date: Thu, 24 May 2007 12:42:16 +0200 Organization: Arcor NNTP-Posting-Date: 24 May 2007 12:42:12 CEST NNTP-Posting-Host: ff1f7dbd.newsspool3.arcor-online.net X-Trace: DXC=oo8^c^DCDB8L2C_`koXfC5McF=Q^Z^V384Fo<]lROoR1Fl8W>\BH3Y2gAH8R8U>S\?N[W On Thu, 2007-05-24 at 10:02 +0200, Dmitry A. Kazakov wrote: > > Coming from C++, I have never seen any single example where assignment > > made sense with polymorphic hierarchies. ... > > > Do you know any such example? Can you show it? > > Marshaling objects. In fact, Eiffel has a relative, the assignment attempt (written "?="). And the Eiffel arguments versus Liskov/Wing are that the principles guiding program design should come from the solution to a problem, not from models when these cannot capture the solution. In a sense, it is argued that that L/W substitution (and also co/contra-variance) violate programming principles! For example, you can make a primitive operation abstract ("deferred", "take it away") in a derived type. This might make sense when for some good reasons, a *real* *world* heir cannot (a) have the inherited operation (b) change its parents.