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.36.6 with SMTP id m6mr3681725pbj.4.1322042234763; Wed, 23 Nov 2011 01:57:14 -0800 (PST) Path: lh20ni8575pbb.0!nntp.google.com!news2.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Generic-Package Elaboration Question / Possible GNAT Bug. Date: Wed, 23 Nov 2011 10:56:57 +0100 Organization: cbb software GmbH Message-ID: <1jxx617mf2cqf$.1j076axdq83mr$.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> <16ipwvpdavifr$.17bxf7if7f6kh$.dlg@40tude.net> <4ecb78b1$0$6643$9b4e6d93@newsspool2.arcor-online.net> <1iofgbqznsviu$.phvidtvxlyj4$.dlg@40tude.net> <4ecbb96e$0$6581$9b4e6d93@newsspool3.arcor-online.net> <4ecbdfdb$0$6629$9b4e6d93@newsspool2.arcor-online.net> <12hfiflyf7pr5$.l3pkpgoid8xt$.dlg@40tude.net> <1ecuhb030iugz.4q1hfjx371xa.dlg@40tude.net> <4ecc393d$0$7625$9b4e6d93@newsspool1.arcor-online.net> <124aq618dmove.884jj64mzm6w$.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: FbOMkhMtVLVmu7IwBnt1tw.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:14557 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2011-11-23T10:56:57+01:00 List-Id: On Wed, 23 Nov 2011 09:32:20 +0000, Simon Wright wrote: > "Dmitry A. Kazakov" writes: > >> It is lousy language design placing implementation (executable code >> ensuring the desired behavior, e.g. raising exception) into >> declarations. > > Are you just talking about [post]conditions? because it's not uncommon > to use complex declarative regions for run-time array bounds etc, which > will include the possibility of exceptions. Such constructs are certainly not welcome. However declaration of a local variable requiring some elaboration that may fail is one thing, placing executable semantically loaded code into the interfaces is extreme. Implementation belongs to the bodies. If you mean dynamic constraints, yes it is very dangerous stuff, which must be handled by the language with a great care. I think Ada 83-95 found a balance here. P.S. I hope everybody agrees that dynamic pre-/post-conditions are a part of the implementation? The rest is simple. [A comparable case is barriers of entries.] -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de