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 X-Google-Thread: 103376,243dc2fb696a49cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews1.google.com!not-for-mail From: kevin.cline@gmail.com (Kevin Cline) Newsgroups: comp.lang.ada Subject: Re: Ada Popularity: Comparison of Ada/Charles with C++ STL (and Perl) Date: 29 Sep 2004 20:42:02 -0700 Organization: http://groups.google.com Message-ID: References: <1777528.JKnUEYTOM6@linux1.krischik.com> <1ec946d1.0409230820.455ad242@posting.google.com> <3673998.bj16mkkOu2@linux1.krischik.com> <1700922.2nPlMsa4Ny@linux1.krischik.com> <1636756.M7hCqjsVMv@linux1.krischik.com> NNTP-Posting-Host: 170.215.186.45 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1096515723 14390 127.0.0.1 (30 Sep 2004 03:42:03 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 30 Sep 2004 03:42:03 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:4427 Date: 2004-09-29T20:42:02-07:00 List-Id: Matthew Heaney wrote in message news:... > kevin.cline@gmail.com (Kevin Cline) writes: > > > 2. AFAIK, Ada does not support pointer-to-record member so it would > > have been necessary to somehow wrap each record member with a > > function. > > Declare the record component as aliased. There seems to be some confusion between creating a pointer to a particular member of a particular record, and the C++ pointer to member type. In C++: struct X { int a; int b; }; X x1 = { 3, 5 }; X x2 = { 4, 6 }; int X::*ptm = &X::a; ASSERT(x1->*ptm == 3); ASSERT(x2->*ptm == 4); ptm = &X::b; ASSERT(x1->*ptm == 5); ASSERT(x2->*ptm == 6); The availability of pointers to members makes it possible to concisely express the mapping between the a data member and the "A" column of a database table.