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: 103376,7a7040918881fd02 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-12 13:30:33 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.cwix.com!chnws02.mediaone.net!chnws06.ne.mediaone.net!65.96.0.182!typhoon.ne.mediaone.net.POSTED!not-for-mail Message-ID: <3C40AB21.6070908@mediaone.net> From: Ed Falis User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20020105 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Assertions in the Next Ada Standard References: <3C3E8438.E780D942@adaworks.com> <3C3F45EE.7030808@look.ca> <3C3FE630.BDB27416@adaworks.com> <3C409568.4000102@look.ca> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Sat, 12 Jan 2002 21:27:28 GMT NNTP-Posting-Host: 24.60.18.249 X-Complaints-To: abuse@mediaone.net X-Trace: typhoon.ne.mediaone.net 1010870848 24.60.18.249 (Sat, 12 Jan 2002 16:27:28 EST) NNTP-Posting-Date: Sat, 12 Jan 2002 16:27:28 EST Organization: ATT Broadband Xref: archiver1.google.com comp.lang.ada:18835 Date: 2002-01-12T21:27:28+00:00 List-Id: FGD wrote: > From my perspective, invariants have many merits. The most important is > that it provides a uniform way of implementing all the type improvements > I ever thought of in a uniform way. I'm still not sure about > pre-/post-conditions. Right now, it seems to me that the associated > complexities outnumber the benefits and I'm still curious about > practical applications... In the Eiffel model, the purpose of pre and post conditions is to establish the contract between caller and callee. The practical benefit is that if a precondition is violated, then client code is where you look to find the problem; if the postcondition is violated the service code is where you start. An additional advantage of this approach is the elimination of code in services that would check explicitly for violations of the preconditions during deployment (the usual model is to enable pre and post condition checking during development, and to disable it during deployment). - Ed