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,ea5071f634c2ea8b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.59.229 with SMTP id c5mr2873216pbr.6.1321950100864; Tue, 22 Nov 2011 00:21:40 -0800 (PST) Path: lh20ni4576pbb.0!nntp.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Generic-Package Elaboration Question / Possible GNAT Bug. Date: Tue, 22 Nov 2011 09:21:41 +0100 Organization: cbb software GmbH Message-ID: <2hbtv0mgdhek$.yv6k7nmd8l5j$.dlg@40tude.net> References: <7bf9bc32-850a-40c6-9ae2-5254fe220533@f29g2000yqa.googlegroups.com> <4295dc09-43de-4557-a095-fc108359f27f@y42g2000yqh.googlegroups.com> <3snehoqgs8ia$.1nobjem6g6hx6$.dlg@40tude.net> <128rdz2581345$.c4td19l7qp9z$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: ARmOcGB+2dBIwZUEYVS5Gg.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news2.google.com comp.lang.ada:14506 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2011-11-22T09:21:41+01:00 List-Id: On Mon, 21 Nov 2011 14:41:05 -0500, Robert A Duff wrote: > "Dmitry A. Kazakov" writes: > >> Conversion of errors into exceptions is an extremely bad idea. The same >> fault is represented by dynamic pre-/pos-conditions, assertions, >> accessibility checks, tag errors. > > But it's not feasible to catch all errors statically. It is same as to say that it is infeasible to determine program legality statically. Legality is static per definition. > If you made a > rule that all preconditions (for example) must be statically checked, > that would simply mean lots of preconditions are inexpressible. If a "precondition" is not static then it is just a part of the *code* determining the control flow. In earlier times such things were called prologue and epilogue. There are many issues with them: 1. Stuffing declarative regions with executable code; 2. Defeating principles of structured programming: non-local control flow; 3. Ignoring separation of implementation and interface. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de