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-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 Path: controlnews3.google.com!postnews1.google.com!not-for-mail From: gedb@rushcoding.co.uk (Ged) Newsgroups: comp.lang.c++,comp.lang.ada,comp.lang.eiffel,comp.object Subject: Re: OOP Language for OS Development Date: 5 May 2004 04:58:34 -0700 Organization: http://groups.google.com Message-ID: <1a81ad90.0405050358.b1115f6@posting.google.com> References: <95db0572.0404142153.431fd058@posting.google.com> <566e2bfb.0404181753.2844342f@posting.google.com> <4088D574.2020503@tele2.fr> <1082738747.300309@master.nyc.kbcfp.com> <3AFic.17011$eK3.5247@nwrdny01.gnilink.net> NNTP-Posting-Host: 193.129.160.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1083758315 32280 127.0.0.1 (5 May 2004 11:58:35 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 5 May 2004 11:58:35 +0000 (UTC) Xref: controlnews3.google.com comp.lang.c++:1645 comp.lang.ada:273 comp.lang.eiffel:78 comp.object:763 Date: 2004-05-05T04:58:34-07:00 List-Id: Hyman Rosen wrote in message news:<3AFic.17011$eK3.5247@nwrdny01.gnilink.net>... > [...] > If the template happens to work for > some class that doesn't conform to T, why should it be prevented from doing > so? > Because in Eiffel its all about the contract. When the interface accepts paramaters to conform to T the objects author is taking on a responsibility to ensure that the feature will always accept a paramater that conforms to T. The compiler will do everything it can to help the author meet that commitment. This means that when the author of another objects uses this object, he can make sure that he meets the type requirements expressed in the interface and then move on. The contract works for both the programmers. The client programmer can be confident that future updates to the library are not going to break his code. The library programmer can be update code confident that he will not cause any damage to his clients. This extra effort helps to avoid situations like this one, http://www.kuro5hin.org/story/2004/2/15/11942/2702, where Microsoft developers are forced to code around the dependancy that Borland had upon a bug. In summary, you have at least 3 levels: - Should always work. - Happens to works now, but may change. - Does not work. The middle grey area can be a source of future problems, and should be avoided. This is why somebody should be prevented from doing something that happens to work. Of course, how much benefit you attach to this all depends upon the domain you work within. For some it is essential, for others it is nuisance.