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.224.185.201 with SMTP id cp9mr11822970qab.6.1363115386906; Tue, 12 Mar 2013 12:09:46 -0700 (PDT) Path: o5ni963qas.0!nntp.google.com!newsfeed2.dallas1.level3.net!newsfeed3.dallas1.level3.net!news.level3.com!bloom-beacon.mit.edu!171.64.64.130.MISMATCH!usenet.stanford.edu!news.kjsl.com!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Is this expected behavior or not Date: Tue, 12 Mar 2013 19:21:47 +0100 Organization: cbb software GmbH Message-ID: References: <8klywqh2pf$.1f949flc1xeia.dlg@40tude.net> <513f6e2f$0$6572$9b4e6d93@newsspool3.arcor-online.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: pQ928Up2OZ3uIq9RKW9GMg.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-12T19:21:47+01:00 List-Id: On Tue, 12 Mar 2013 19:04:31 +0100, Georg Bauhaus wrote: > On 12.03.13 18:42, Dmitry A. Kazakov wrote: >> On Tue, 12 Mar 2013 13:19:06 -0400, Robert A Duff wrote: >> >>> > "Dmitry A. Kazakov" writes: >>> > >>>> >> The semantics of 'Pred and 'Succ shall be properly defined in terms of >>>> >> convariance of the argument and the result. There are arguments for and >>>> >> against contravariant results. It goes straight to the circle-ellipse >>>> >> controversy. >>> > >>> > The profile of 'Succ is given in RM-3.5(23): >>> > >>> > function S'Succ (Arg: S'Base) return S'Base; >>> > >>> > It's neither contravariant nor covariant -- it's invariant. >> Invariant = contravariant. > > In Ada? For non-tagged types? Tagged is a special case, nothing more. When the compiler allows instances of Prime in an operation of Prime'Base that means that Prime inherits the operation <=> Prime is a subtype of Prime'Base [in an interface having the operation]. In our case the operation is 'Succ. Now if the argument, or result of 'Succ stays Prime'Base that is the definition of the operation being contravariant in it. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de