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-Thread: 103376,73f81e5f5d6ee80f X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.straub-nv.de!noris.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Fri, 12 Dec 2008 13:15:35 +0100 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.18 (Macintosh/20081105) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: MI is sloppy References: <1g29uf1ygl1wc$.1x184o2bk9m0k$.dlg@40tude.net> <1hjx0k7xmfw4n$.14q7chpo1r1ma$.dlg@40tude.net> <49424203$0$31868$9b4e6d93@newsspool3.arcor-online.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-ID: <494255e8$0$31331$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 12 Dec 2008 13:15:36 CET NNTP-Posting-Host: bfa3da3a.newsspool4.arcor-online.net X-Trace: DXC=nWT>P_O7VW]og1;9OJDO8_SK6NSZ1n^B98i:FA1oHl[lKg: X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:3946 Date: 2008-12-12T13:15:36+01:00 List-Id: Dmitry A. Kazakov schrieb: >> If you have an ambitious compiler, it might reach out, >> at compile time, for objects whose behavior is then known >> to be constrained by membership in a then known specific >> subtype. > > ... and then inline raising Constraint_Error. Great! > > Constraint_Error propagation is the contracted behavior. You have signed > that contract, enjoy it. But the compiler informs you that Constraint_Error will be raised if your program is such that it will be raised. Anything wrong with correcting the program? Deriving another type, even if not sufficiently different from the original to warrant a type, is another formal way to trigger the same effect on the programmer, at compile time: "There is something odd about your program". If we wanted more of the minor differences covered by type hierarchies, we might end up with a Qi type system... For Ada?