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: a07f3367d7,73cb216d191f0fef X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII X-Received: by 10.180.10.230 with SMTP id l6mr1251969wib.3.1364344967333; Tue, 26 Mar 2013 17:42:47 -0700 (PDT) Path: ex12ni5451wid.1!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.103.MISMATCH!feeder3.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feed.tweaknews.nl!216.40.29.245.MISMATCH!novia!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newsgate.cuhk.edu.hk!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Sat, 23 Mar 2013 09:14:12 +0100 Organization: cbb software GmbH Message-ID: References: <1wv3p3nrtejfk$.bwebhg9agt0l.dlg@40tude.net> <514874d3$0$6628$9b4e6d93@newsspool2.arcor-online.net> <1o60gooo8xvba$.1ei9cebb07zek$.dlg@40tude.net> <514897bd$0$6641$9b4e6d93@newsspool2.arcor-online.net> <1oqwvcemo8dha$.hevuedtz8eze.dlg@40tude.net> <14aijp8ckzahf$.1ilfm1nw6qgyt$.dlg@40tude.net> <1xg9wka6slgit.1q0leacagdeuv.dlg@40tude.net> <10cliooad0uk.1prxobehp9yr0.dlg@40tude.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: XRUMb5xlbonTNodERpEXEw.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 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Date: 2013-03-23T09:14:12+01:00 List-Id: On Fri, 22 Mar 2013 23:18:02 +0100, J-P. Rosen wrote: > Le 22/03/2013 15:54, Dmitry A. Kazakov a �crit : >>> No, it is not the operation that gives different result, it's the >>> > assignment of a value that is incompatible with the variable's >>> > constraint that raises C_E. >> There is no assignment in my example. Assignment is in the *body* of the >> operation Foo. > No, assignment happens after returning from Foo. You mean "assignment operation," rather than "assignment statement"? Fine, that won't safe you either. Replace "the operation Foo of Positive," with "the assignment operation of Positive." You still have different behavior of an operation. I used Foo merely to prevent yet another fume about whether assignment is an operation. If it is, then simply consider: declare X : Positive; begin X := -1; -- With Integer it behaves *differently* end; So, WHERE is the difference, what make the program above to work differently, if everything [value, type, operation] is SAME? >>> > The theory of ADT has no notion of subtypes (Ada definition). >> There is nothing special in Ada-subtypes. They are just ADTs. > You say they are. The rest of the world says they are not. Georg and Randy seem to dismiss ADT altogether. > We have come > to the point where nothing else can be added. You could add, if you are not with Georg and Randy, why you think Positive is not an ADT. >>> > Therefore, >>> > you can't translate Ada's subtypes into the terms of ADT. >> I just did it. > And that's where everybody (including those who designed/maintain the > language) thinks you are wrong. But none said why. They should have indicated some flaws in the mapping Positive ~ ADT. So far the only argument was that ADT is useless. May be, but irrelevant, because it tells nothing about why Positive is not an ADT. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de