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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,971aa11c293c3db1 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-24 07:49:05 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!cyclone.swbell.net!nnrp3.sbc.net.POSTED!not-for-mail From: "Pat Rogers" Newsgroups: comp.lang.ada References: <5be89e2f.0107170838.c71ad61@posting.google.com> <5be89e2f.0107180235.726d46a8@posting.google.com> <9j3rrd$g71$1@s1.read.news.oleane.net> <5be89e2f.0107181300.4b4e93d7@posting.google.com> <3B57195E.A3A3FED@home.com> <9j93u6$1ua8$1@norfair.nerim.net> <3B586A17.862BA84D@home.com> <9j9s3t$kn8$1@wanadoo.fr> <9jej7c$7q1$1@wanadoo.fr> <9jff9l$sqp$1@wanadoo.fr> <9jk0ep$cj1$1@norfair.nerim.net> Subject: Re: Ada The Best Language? X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Message-ID: Date: Tue, 24 Jul 2001 09:49:03 -0500 NNTP-Posting-Host: 208.191.184.67 X-Complaints-To: abuse@swbell.net X-Trace: nnrp3.sbc.net 995986144 208.191.184.67 (Tue, 24 Jul 2001 09:49:04 CDT) NNTP-Posting-Date: Tue, 24 Jul 2001 09:49:04 CDT Organization: SBC Internet Services Xref: archiver1.google.com comp.lang.ada:10518 Date: 2001-07-24T09:49:03-05:00 List-Id: "Bertrand Augereau" wrote in message news:9jk0ep$cj1$1@norfair.nerim.net... > > Try the other direction: > > > > enum Foo { Red, Orange, Green }; > > > > enum Bar { Mon, Tue, Wed }; > > > > int X = Orange + Tue; > > > > which shows that they are really just ints. > > > > As I pointed out before, this is not a real case error. > If it accepted > Foo X = Orange + Tue; > it would be bad conception, for sure. > > But standard C++ doesn't even accept > Foo X = Orange + Red; > !!! > So there's no way you make an non-intentional mistake, if you want to do > such thing as arithmetics on enum, you have to write explicitly: > Foo X = static_cast(Orange + Red); > > > So I think this is not much weaker than Ada95, is it? > You think it's a major design flaw, I think this is (at worst) a minor one. No, a comparatively minor one.