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.106.73 with SMTP id gs9mr1351832wib.2.1363401373214; Fri, 15 Mar 2013 19:36:13 -0700 (PDT) Path: g1ni68454wig.0!nntp.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!94.232.116.12.MISMATCH!feed.xsnews.nl!border-2.ams.xsnews.nl!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: Wed, 13 Mar 2013 21:54:31 +0100 Organization: cbb software GmbH Message-ID: <72lrnwimkypq.k20q71qpxioc$.dlg@40tude.net> 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> <11rcs3gg4taww$.bylek8fsshyz$.dlg@40tude.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-13T21:54:31+01:00 List-Id: On Wed, 13 Mar 2013 19:54:22 +0000, Simon Wright wrote: > "Dmitry A. Kazakov" writes: > >> On Wed, 13 Mar 2013 17:45:56 +0000, Simon Wright wrote: >> >>> I don't remember ever using 'Pred/'Succ, >> >> Even in: >> >> generic >> type Discrete is (<>); >> package Foo is > > Nope. > > Out of over 200 packages I have only one with this construct: it is a > signature package, no need for 'Pred or 'Succ (in other words, the > enumeration defines a set of distinct possibilities, ordering > irrelevant). You need (<>) as an ancestor of both mod <> and range <> in packages that should be instantiated with either integer or modular type. Ada needs explicit interfaces, so that you could declare an unordered enumeration if you don't need order. However, from the practical perspective that would be public view, privately you still need it ordered in some ad-hoc way to be able to implement stream attributes, hash tables etc. P.S. This is how Ada could finally get curly brackets (:-)): type Color is {Red, Green, Blue}; -- No order in public views -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de