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,FREEMAIL_FROM autolearn=ham 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 18:25:39 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: stevenwurster@lycos.com (Steven Wurster) Newsgroups: comp.lang.c++,comp.lang.ada,comp.lang.eiffel,comp.object Subject: Re: OOP Language for OS Development Date: 24 Apr 2004 18:25:38 -0700 Organization: http://groups.google.com Message-ID: 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> NNTP-Posting-Host: 69.137.136.237 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1082856339 11833 127.0.0.1 (25 Apr 2004 01:25:39 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 25 Apr 2004 01:25:39 +0000 (UTC) Xref: archiver1.google.com comp.lang.c++:31469 comp.lang.ada:7460 comp.lang.eiffel:744 comp.object:11123 Date: 2004-04-24T18:25:38-07:00 List-Id: Robert C. Martin wrote in message news:... > > 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. > Remember that it's not required for a descendant class to covariantly redefine arguments in Eiffel. It is an option, however. And, yes, doing it can lead to problems. In fact, we have a name for it in Eiffel. It's called a CATcall, where CAT stands Changing Availability or Type. That is, where a descendant routine either changes its availability (i.e. becomes less visible) or its argument types. The Eiffel community knows about this, and knows how to deal with it. And, no, a compiler cannot reasonably detect where CATcalls lead to LSP violations. But, I'd rather use Eiffel with that 'hole' than languages that have less power and less support for the OCP, among their other faults. Steve