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.10.230 with SMTP id l6mr970487wib.3.1363377070239; Fri, 15 Mar 2013 12:51:10 -0700 (PDT) Path: bp2ni94204wib.1!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.138.MISMATCH!xlned.com!feeder5.xlned.com!news.astraweb.com!border2.a.newsrouter.astraweb.com!newsfeed10.multikabel.net!multikabel.net!newsfeed20.multikabel.net!news.mi.ras.ru!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: Tue, 12 Mar 2013 10:27:51 +0100 Organization: cbb software GmbH Message-ID: References: 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-12T10:27:51+01:00 List-Id: On Mon, 11 Mar 2013 13:41:43 -0700 (PDT), Shark8 wrote: [...] > We don't want the subtype "Head" to fail when the Pred'(Pos) is applied > [and Pos = 1] while declaring the range; this precisely because the > null-range is valid and what we desire. The construction of range 1..0 > should therefore not generate an exception despite 0 not being a member of > Positive. The issue of the bounds of an empty string is not related to subtypes. It has a long history. But in short, you should not break one thing in order to save another. 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. As Robert pointed out Ada tends to contravariance for numeric operations. But it is not a trivial choice for 'Pred, 'Succ, 'Range. Consider for I in Prime'Range loop -- What is this supposed to mean? ... -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de