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,5d4ade2fd8fd67c6 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!goblin2!goblin1!goblin.stu.neva.ru!news.tornevall.net!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Legit Warnings or not Date: Mon, 8 Aug 2011 16:30:16 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <531193e0-3305-4292-9ed8-0176226c1d00@x12g2000yql.googlegroups.com> <1rx6dwrxmc81p.eazb4fjqztox$.dlg@40tude.net> <1hi6gva8jhf7o.tq1yp29jn3qu.dlg@40tude.net> <110nibt4tsn7q.162t6eli286tt.dlg@40tude.net> <1wg90w555yp7f.1lhp1szkc0cu5$.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1312839018 22865 69.95.181.76 (8 Aug 2011 21:30:18 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 8 Aug 2011 21:30:18 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 Xref: g2news2.google.com comp.lang.ada:21464 Date: 2011-08-08T16:30:16-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:fopu9zln3g4f.1ocdgf28k7s69.dlg@40tude.net... > On Fri, 5 Aug 2011 18:57:43 -0500, Randy Brukardt wrote: ... >> I don't see any implicit constraints. If there are any, they ought to be >> eliminated. > > Then: > > procedure Carcinogenic (X : in out T'Class) is > Y : T; > begin > X := T; > end Carcinogenic; > > Z : S'Class; -- Constrained to S'Class? > begin > Carcinogenic (T'Class (Z)); -- Ignore the constraint! > > [ Your idea is to make all classes subtypes of some huge dynamic type. > This > is not a workable type model as so many OOPLs already showed. ] As I said, there shouldn't be any partial constraints. But S'Class is not a constraint, it is a type. The problem here is that the type system is being violated by back conversion of Z from the less restrictive type. So I think this conversion should be illegal. However, I have to agree that such a rule would be too incompatible for Ada. So we'll have to forget my idea. Unfortunately, I think this proves that we've pretty much taken the core of Ada as far as it can go. (We can still add stuff around the edges, as with the contracts.) If we really want to advance, we're going to have to start over. Randy.