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 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,f66d11aeda114c52 X-Google-Attributes: gidfac41,public X-Google-Thread: 103376,f66d11aeda114c52 X-Google-Attributes: gid103376,public From: Bertrand Meyer Subject: Re: Critique of Ariane 5 paper (finally!) Date: 1997/08/22 Message-ID: <33FDCAF1.1CFBAE39@eiffel.com>#1/1 X-Deja-AN: 267981433 References: <33E503B3.3278@flash.net> <33E8FC54.41C67EA6@eiffel.com> <33E9B217.39DA@flash.net> <33EA5592.5855@flash.net> <33EB4935.167EB0E7@eiffel.com> <33EB754E.446B9B3D@eiffel.com> <33EBE46D.2149@flash.net> <33EF9487.41C67EA6@eiffel.com> <33F22B91.167EB0E7@eiffel.com> <33FCCC68.60B@pseserv3.fw.hac.com> Organization: Interactive Software Engineering Inc. Newsgroups: comp.lang.ada,comp.lang.eiffel Date: 1997-08-22T00:00:00+00:00 List-Id: W. Wesley Groleau wrote: > what some people disagree with is the use of two definitions of > DBC by the same advocates. > > Def'n 1 - Associating specifications with software elements" and > related practices. > Def'n 2 - The Eiffel implementation of a subset of these practices. > > Now before anyone denies having used definition 2, please explain > what definition of DBC satisfies the claim "only Eiffel directly > supports DBC" This has been explained many times. One can to some degree apply the principles of Design by Contract in any language, but among commercially commercially available languages Eiffel is the only one to offer direct support for "associating specifications with software elements" as part of the software elements themselves, i.e. using language constructs -- preconditions, postconditions, class invariants, loop invariants, loop variants. In other languages you have to resort to purely methodological guidelines or to comment conventions etc. It's better than nothing, but does not go as far, because the presence of the assertion constructs provides Eiffel users with major benefits such as: - Documentation tools (in the supporting environments) that extract the specification from the software. Such tools provide a standard form of documentation for reusable components and are essential to the success of reusability efforts. - Better reusable libraries (this too is a property of the environments, made possible by the language) thanks to their extensive use of assertions (e.g. EiffelBase). Also, these libraries naturally serve as models and guides for users learning the approach, so they indirectly lead to more reliable and clearer application software. - Runtime assertion monitoring (again in the environments) providing a particularly effective tool for testing, debugging and quality assurance. - Language rules that associate assertions with inheritance: precondition weakening and postcondition strengthening in routine redefinitions, invariant accumulation (a class inherits its parents' integrity constraints). This is essential to control the power of polymorphism and dynamic binding, further decreasing bug sources. - Close connection with the exception handling mechanism. - Simplification of the software's structure, since supplier classes can avoid redundant checking of special cases in the presence of preconditions. - General improvements in software quality: having a construct in the language itself encourages developers to use it -- especially, as noted, thanks to the influence of reusable components --, more so than a purely methodological injunction to "be good" and specify. In other words, use of Eiffel helps promote a quality-oriented and reliability-conscious mindset. This is a less directly palpable benefit (and please do not construe it as a claim that "Eiffel users make no errors", no one ever said that) but significant all the same. Most of this is unique to Eiffel among widely used commercial languages. Again it does not mean that you cannot get any benefit of Design by Contract in other languages; you can (especially if you have used Eiffel before: many people have noted that you can become a better C++ programmer, for example, if you have been trained in Eiffel; see e.g the educators' testimonials at http://www.eiffel.com/services/university/). But you will get much more in Eiffel. -- Bertrand Meyer, President, ISE Inc. ISE Building, 2nd floor, 270 Storke Road, Goleta CA 93117 805-685-1006, fax 805-685-6869, http://www.eiffel.com, with download instructions