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,73cb216d191f0fef X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.10.230 with SMTP id l6mr293287wib.3.1363340696651; Fri, 15 Mar 2013 02:44:56 -0700 (PDT) Path: bp2ni93379wib.1!nntp.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Fri, 15 Mar 2013 10:46:27 +0100 Organization: cbb software GmbH Message-ID: References: <8klywqh2pf$.1f949flc1xeia.dlg@40tude.net> <513f6e2f$0$6572$9b4e6d93@newsspool3.arcor-online.net> <513faaf7$0$6626$9b4e6d93@newsspool2.arcor-online.net> <51408e81$0$6577$9b4e6d93@newsspool3.arcor-online.net> <1xqmd3386hvns.1og1uql2cgnuf$.dlg@40tude.net> <5140b812$0$6575$9b4e6d93@newsspool3.arcor-online.net> <5140f1ad$0$6634$9b4e6d93@newsspool2.arcor-online.net> <7jct0noryc1v.1rnj5kkzx6m35.dlg@40tude.net> <5141c499$0$6642$9b4e6d93@newsspool2.arcor-online.net> <18r2kop6fyozu.tctrjnghfxqs.dlg@40tude.net> <1wv3p3nrtejfk$.bwebhg9agt0l.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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2013-03-15T10:46:27+01:00 List-Id: On Thu, 14 Mar 2013 17:12:28 -0500, Randy Brukardt wrote: > "Dmitry A. Kazakov" wrote in message > news:1wv3p3nrtejfk$.bwebhg9agt0l.dlg@40tude.net... >> On Thu, 14 Mar 2013 17:21:23 +0100, J-P. Rosen wrote: > ... >>> The set of values is not defined by Positive, it is defined by Integer. >> >> Still, Positive has values, and operations. > > Yes, and they're exactly the same set as Integer has. Even so, having those makes it an ADT. For the sake of argument consider subtype Integer_X is Integer; Both are ADTs. BTW, a renaming would be the thing you are talking about. But Ada does not have type renaming. People [mis]using subtypes for the purpose of renaming must be prepared to nasty surprises. > There are some differences in *dynamic* behavior, but that has nothing to do > with the available values and operations. (The text you quoted from the RM > about values "belonging" to a subtype is defining dynamic behavior.) I > recall some Dmitry guy telling us that dynamic behavior is different from > static behavior, and even claiming that dynamic behavior cannot constitute a > contract. So it if is not a *contract*, how come it matters for a *type* > (which is an integral part of describing a contract)? I don't understand the point you are making. You cannot derive contract from behavior, simply because it is converse: contract is imposed to restrain possible behaviors. You might claim that implied contracts of Integer and Positive are exactly same. I doubt that many would agree with that. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de