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: 103376,7a7040918881fd02 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-16 22:29:02 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed2.earthlink.net!newsfeed.earthlink.net!news.mindspring.net!not-for-mail From: Richard Riehle Newsgroups: comp.lang.ada Subject: Re: Assertions in the Next Ada Standard Date: Wed, 16 Jan 2002 22:23:13 -0800 Organization: AdaWorks Software Engineering Message-ID: <3C466DD1.5080813D@adaworks.com> References: <3C3E8438.E780D942@adaworks.com> <3C3F45EE.7030808@look.ca> <3C3FE630.BDB27416@adaworks.com> Reply-To: richard@adaworks.com NNTP-Posting-Host: 9e.fc.cc.d2 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Server-Date: 17 Jan 2002 06:28:04 GMT X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:18995 Date: 2002-01-17T06:28:04+00:00 List-Id: I appreciate the thoughtful contributions regarding assertions in next Ada standard. It was my understanding someone was drafting a proposal for this and I was hoping to see some comment from whoever that might be. Meanwhile, I clipped the following from a discussion about the assertion mechanism in Java from a discussion on comp.object. ------------------ quote from comp.object ------------------------- The documentation at Sun recommends NOT using assertions to check argument values on public methods. You should still continue to do this kind of thing with if statement and throw IllegalArgumentException. ----------------------------------------- 3.Why not provide a full-fledged design-by-contract facility with preconditions, postconditions and class invariants, like the one in the Eiffel programming language? We considered providing such a facility, but were unable to convince ourselves that it is possible to graft it onto the Java programming language without massive changes to the Java platform libraries, and massive inconsistencies between old and new libraries. Further, we were not convinced that such a facility would preserve the simplicity that is Java's hallmark. On balance, we came to the conclusion that a simple boolean assertion facility was a fairly straight-forward solution and far less risky. It's worth noting that adding a boolean assertion facility to the language doesn't preclude adding a full-fledged design- by-contract facility at some time in the future. ------------------------------------ ----------------- end of quote from comp.object --------------- > Richard Riehle