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-Thread: 109fba,cd8ed9115942852f X-Google-NewGroupId: yes X-Google-Thread: 103376,b92b95c9b5585075 X-Google-NewGroupId: yes X-Google-Attributes: gid4f1905883f,gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Randy Brukardt" Newsgroups: comp.lang.c++,comp.lang.ada Subject: Re: Why use C++? Date: Fri, 12 Aug 2011 17:09:25 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <1e292299-2cbe-4443-86f3-b19b8af50fff@c29g2000yqd.googlegroups.com> <1fd0cc9b-859d-428e-b68a-11e34de84225@gz10g2000vbb.googlegroups.com> <9ag33sFmuaU1@mid.individual.net> <1d8wyhvpcmpkd.ggiui9vebmtl.dlg@40tude.net> <150vz10ihvb5a.1lysmewa1muz4$.dlg@40tude.net> <1q4c610mmuxn7$.1k6s78wa0r8fj.dlg@40tude.net> <4e44e50a$0$7619$9b4e6d93@newsspool1.arcor-online.net> <4e45276d$0$13269$a8266bb1@newsreader.readnews.com> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1313186968 7005 69.95.181.76 (12 Aug 2011 22:09:28 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 12 Aug 2011 22:09:28 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6109 Path: g2news2.google.com!news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!feed.ac-versailles.fr!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!jacob-sparre.dk!ada-dk.org!.POSTED!not-for-mail Xref: g2news2.google.com comp.lang.c++:92659 comp.lang.ada:21558 Date: 2011-08-12T17:09:25-05:00 List-Id: "Hyman Rosen" wrote in message news:4e45276d$0$13269$a8266bb1@newsreader.readnews.com... ... > A few; of course, when I was a complete Ada beginner (not that > I'm much more than that now) I was always thrown by the use of > apostrophes as attribute designators. When I see > > for Intensity'Size use 8; > > it makes me want to go off searching for where the string ends > and trying to figure out what's going on. I also don't know that > a beginner finds the notion of an enumerated type declared as an > array index to be immediately obvious. In Ada 2012, you could write this as part of the type declaration (much preferable, IMHO): type Intensity is range 0 .. 255 with Size => 8; and then you wouldn't have to guess what the apostrophe means. You'd still have to guess what "Size" means (bits or bytes? It's fairly obvious here, but not always). Randy.