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.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c5ca2cbae60e9fee X-Google-Attributes: gid103376,public From: Ehud Lamm Subject: Re: OO puzzle Date: 1999/12/25 Message-ID: <84216l$i2i$1@nnrp1.deja.com>#1/1 X-Deja-AN: 564739093 References: <83qtap$pri$1@nnrp1.deja.com> <83sqht$5oi$1@nnrp1.deja.com> X-Http-Proxy: 1.0 o-proxy.cc.huji.ac.il:8080 (Squid/2.2.STABLE4), 1.0 x42.deja.com:80 (Squid/1.1.22) for client 132.64.12.10, 132.64.1.34 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Sat Dec 25 09:05:15 1999 GMT X-MyDeja-Info: XMYDJUIDehudlamm Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Date: 1999-12-25T00:00:00+00:00 List-Id: In article , Robert A Duff wrote: > Ehud Lamm writes: > > > But than you lose the ability to define the abstract interface (for > > Motor_Vehicle) and know that it is supported by all descendants. > > But it seems to me that you are *not* requiring the descendants to > support that interface. You are trying to let the descendants support a > different operation, also called "register", but with a different > contract (ie, trucks can't register airplane drivers, although the > parent type implied they could -- or whatever the example was). > Yep. In essence it is like saying that suporting a covariant interface is still an IS-A relationship. I am not sure if I am comfortable with this notion, but it does have an impact on design. > It's an interesting language design issue, anyway. > I'll add one more quote from the Eiffel book: "The above two properties (P1 and P2) often seem surprising at first. Why make type checking more difficult, and introduce the distinction between class-level and system-level validity by allowing classes to choose export and argument typing policies different from those of its parents? The answer is the this felxibilty is indispensable to the practice of object-oriented design. without it designer would constantly have to reshuffle inheritance hierarchies, and would have much difficulty observing the constraints of a typed object-oriented language. P1 and P2 serve to acknowledge the inescapable difficulty of reconciling the golas of orderly classifiaction (as implemented through inheritance) and safety (as implemented through typing) with the irruglarities and instability of the real-world situtations which our software systems attempt to model through their inheritance hierarchies." The is the view of the designer of Eiffel. ---- Ehud Lamm mslamm@mscc.huji.ac.il http://purl.oclc.org/NET/ehudlamm Check it out and subscribe to the E-List Sent via Deja.com http://www.deja.com/ Before you buy.