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-7-bit X-Received: by 10.180.86.34 with SMTP id m2mr1385833wiz.5.1363406335008; Fri, 15 Mar 2013 20:58:55 -0700 (PDT) Path: g1ni68564wig.0!nntp.google.com!feeder1.cambriumusenet.nl!82.197.223.103.MISMATCH!feeder3.cambriumusenet.nl!feed.tweaknews.nl!81.171.88.15.MISMATCH!eweka.nl!lightspeed.eweka.nl!213.73.255.4.MISMATCH!multikabel.net!newsfeed20.multikabel.net!news.mi.ras.ru!goblin1!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: Thu, 14 Mar 2013 10:09:10 +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> 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-14T10:09:10+01:00 List-Id: On Wed, 13 Mar 2013 18:34:35 -0400, Robert A Duff wrote: > "Dmitry A. Kazakov" writes: > >> Ada's design choice was in favor of Integer's order: 'Succ (3)=4. But >> user's expectation was the order from the problem space 'Succ(3)=5. > > As a user, what is your expectation for the following? My expectation is that the language should not let me doing this without requesting explicit specification of which interfaces and implementations get inherited. Prime is clearly not integer, so if I inherit from it publicly while applying some constraint which is not a range, I must be required to override all numeric operations, all relational operations, all operations that depends on ordering IF I want them. But the default if, there should be any, must be no such operations inherited. There is too much going under the carpet, which is wrong. Ada must have explicit interfaces manifested. RM 3.5.5, 3.5.8, 3.5.10 etc are nothing but descriptions of interfaces. They shall have names. And it must be said that a declaration like type T is range A..B; is a shortcut for a more explicit declaration of T inheriting interfaces of a scalar object, a comparable object, a numeric object, an ordered object, a copyiable object etc. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de