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:24:27 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!193.251.151.101!opentransit.net!wanadoo.fr!proxad.net!nerim.net!norfair.nerim.net!not-for-mail From: "Bertrand Augereau" Newsgroups: comp.lang.ada Subject: Re: Ada The Best Language? Date: Tue, 24 Jul 2001 16:29:09 +0200 Organization: Nerim -- xDSL Internet Provider Message-ID: <9jk0ep$cj1$1@norfair.nerim.net> 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> NNTP-Posting-Host: aboukir-101-2-1-inutero.adsl.nerim.net X-Trace: norfair.nerim.net 995984665 12897 62.4.19.69 (24 Jul 2001 14:24:25 GMT) X-Complaints-To: abuse@nerim.net NNTP-Posting-Date: Tue, 24 Jul 2001 14:24:25 +0000 (UTC) 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 Xref: archiver1.google.com comp.lang.ada:10515 Date: 2001-07-24T16:29:09+02:00 List-Id: > 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.