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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?B?QmrDtnJuIEx1bmRpbg==?= Newsgroups: comp.lang.ada Subject: Re: If not Ada, what else... Date: Sat, 11 Jul 2015 12:59:56 +0200 Organization: A noiseless patient Spider Message-ID: References: <14592326-5070-4663-a864-5684298f3748@googlegroups.com> <004361da-53c4-4ea9-8cc6-38944aa6c7ad@googlegroups.com> <29dd5458-f9ce-4db8-9128-8ab35a9ce5f8@googlegroups.com> <64bc671c-72e5-4924-b703-3b907c69949c@googlegroups.com> <877fq9uj6g.fsf@theworld.com> <65061686-5c8f-433b-9b11-9e228298158e@googlegroups.com> <87k2u96jms.fsf@jester.gateway.sonic.net> <06f8a6f9-d219-4d40-b9ac-8518e93839bd@googlegroups.com> <87y4io63jy.fsf@jester.gateway.sonic.net> <7a29d3e9-d1bd-4f4a-b1a6-14d3e1a83a4d@googlegroups.com> <87mvz36fen.fsf@jester.gateway.sonic.net> <2215b44f-8a89-47c6-a4c4-52b74d2dac45@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 11 Jul 2015 10:57:15 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="d2d02d9cc3d0011cde6cddd52020399a"; logging-data="21034"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18RfhzWnQQqrnyabiXYYaIc" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0 In-Reply-To: Cancel-Lock: sha1:4y9u4AD4ePC64l10v59gGZfmWHo= Xref: news.eternal-september.org comp.lang.ada:26768 Date: 2015-07-11T12:59:56+02:00 List-Id: On 2015-07-11 12:46, Brian Drummond wrote: > On Fri, 10 Jul 2015 12:43:55 -0700, Patrick Noffke wrote: > >> On Friday, July 10, 2015 at 2:10:44 PM UTC-5, David Botton wrote: >>>> I may be missing something here, but I don't see where Ada's type >>>> system is that much better than C++'s, > And you can loop over the enum range (without explicitly naming its first > and last tokens), and index arrays with them, etc, right? > And also use them is case/switch statements where missing values generates compiler errors ? as in procedure junk1 is type Junk_Type is (One, Two, Three); Junk : Junk_Type := Junk_Type'Last; begin case Junk is when One => null; when Two => null; end case; end Junk1; gcc -c -x ada junk1.ada junk1.ada:10:03: missing case value: "three" gnatmake: "junk1.ada" compilation error -- Björn