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 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,e0a59694a441eb7b X-Google-Thread: 103376,e0a59694a441eb7b X-Google-Thread: fac41,e0a59694a441eb7b X-Google-Thread: 1108a1,e0a59694a441eb7b X-Google-Attributes: gid109fba,gid103376,gidfac41,gid1108a1,public X-Google-ArrivalTime: 2004-04-24 05:53:59 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-post-01!supernews.com!news.supernews.com!not-for-mail From: Robert C. Martin Newsgroups: comp.lang.c++,comp.lang.ada,comp.lang.eiffel,comp.object Subject: Re: OOP Language for OS Development Date: Sat, 24 Apr 2004 07:53:57 -0500 Organization: Object Mentor Inc. Message-ID: Reply-To: u.n.c.l.e.b.o.b@objectmentor.com References: <95db0572.0404142153.431fd058@posting.google.com> <566e2bfb.0404181753.2844342f@posting.google.com> <4088D574.2020503@tele2.fr> <1082732696.152155@master.nyc.kbcfp.com> <1082759585.818002@master.nyc.kbcfp.com> X-Newsreader: Forte Agent 1.93/32.576 English (American) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.c++:31406 comp.lang.ada:7450 comp.lang.eiffel:737 comp.object:11084 Date: 2004-04-24T07:53:57-05:00 List-Id: On Fri, 23 Apr 2004 18:33:05 -0400, Hyman Rosen wrote: >Brian_Heilig wrote: >> Either I don't understand your post or you are mistaken. If the >> derived class conforms to (inherits from) the parameter's type then >> there is no problem. > >In Eiffel, Derived::Foo(Derived) overrides Base::Foo(Base). >That means that if you have a Base object, and you call >some_base_reference.Foo(some_other_base_reference), the call >looks correct, but if some_base_reference is really a Derived >and some_other_base_reference is not a Derived, you have an >error. > >It's a horrible misfeature, but its proponents cling to it >tenaciously, and they have spent years trying to figure out >workarounds so that the errors can be caught. It's an LSP violation. Code written to deal with base classes can be broken by new derivatives that can't accept the arguments that the base can. This makes it hard to follow the Open Closed Principle which says that you should try to make modules extensible without having to change them. ----- Robert C. Martin (Uncle Bob) Object Mentor Inc. unclebob @ objectmentor . com 800-338-6716 "Distinguishing between the author and the writing is the essence of civilized debate." -- Daniel Parker