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-Thread: 103376,7d3cb5920e882220 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Exceptions Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <5947aa62-2547-4fbb-bc46-1111b4a0dcc9@x69g2000hsx.googlegroups.com> <475c6ed8$0$13111$9b4e6d93@newsspool2.arcor-online.net> <1kxk3hlfa25dw$.fl2wvbn0tpbg$.dlg@40tude.net> <475d04ea$0$13113$9b4e6d93@newsspool2.arcor-online.net> <194zh0rz03487$.6vxhavjdbpdr.dlg@40tude.net> <475e4820$0$17540$9b4e6d93@newsspool4.arcor-online.net> <475eb729$0$13118$9b4e6d93@newsspool2.arcor-online.net> Date: Wed, 12 Dec 2007 12:18:41 +0100 Message-ID: NNTP-Posting-Date: 12 Dec 2007 12:10:57 CET NNTP-Posting-Host: 51542673.newsspool3.arcor-online.net X-Trace: DXC=6HUd`cD1f:Ogj[ZPFj7ehOMcF=Q^Z^V3H4Fo<]lROoRA4nDHegD_]REZ3gA6Ob\[RDDNcfSJ;bb[EFCTGGVUmh?DLK[5LiR>kgBo@aQ;\m`i^A X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:18908 Date: 2007-12-12T12:10:57+01:00 List-Id: On Tue, 11 Dec 2007 17:13:28 +0100, Georg Bauhaus wrote: > Dmitry A. Kazakov schrieb: > >> 1. It is *not* about semantics of exceptions, see above. >> >> 2. The program design above (in my view) is fundamentally flawed, because >> exceptions are for programming, they are not for debugging. > > OK, I beg to differ. Exceptions (starting with their very name) > should not be (mis)used for signalling information IMHO. Ada has > better tools for sending messages, or for information passing. This is wrong in many aspects: A. Exceptions are more about flow control than passing data. Message sending would an inappropriate abstraction here, for many reasons. B. An exception signals the program state change. The name of means that the new state is somewhat exceptional, in the sense that it is not desired, not so common. But it is still a legal state. Bug is *no* state. C. Exceptions as a programming language construct, per definition, are for programming (software design). Debugging is not programming. (I hope you aren't going to propose a "bug-driven software design paradigm" (:-)) >>> So we need a different program! One that enables the compiler >>> to notice that the exception announcements have been changed. >> >> What for, if the handling is still same? > > The exceptions have been switched so handling must make > a corresponding switch, If you want to deal with program correctness (semantics) then there should be other tools, like SPARK. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de