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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,243dc2fb696a49cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews1.google.com!not-for-mail From: slatyb@yahoo.com (K) Newsgroups: comp.lang.ada Subject: Re: Ada Popularity: Comparison of Ada/Charles with C++ STL (and Perl) Date: 1 Oct 2004 23:48:11 -0700 Organization: http://groups.google.com Message-ID: <4c2ec8a8.0410012248.2708edd2@posting.google.com> References: <1700922.2nPlMsa4Ny@linux1.krischik.com> <1636756.M7hCqjsVMv@linux1.krischik.com> NNTP-Posting-Host: 24.219.97.214 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1096699691 7668 127.0.0.1 (2 Oct 2004 06:48:11 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 2 Oct 2004 06:48:11 +0000 (UTC) Xref: g2news1.google.com comp.lang.ada:4550 Date: 2004-10-01T23:48:11-07:00 List-Id: Bj�rn Persson wrote in message news:... > Kevin Cline wrote: > > > Looks like I should have written: > > > > struct X > > { > > int a; > > int b; > > float c; > > std::string d; > > } > > :-) I thought you'd counter with that. So now you have a structure with > two integers, a float and a string, and you need to set a variable such > that the one or the other integer is selected depending on the variable. No, I think that you are missing the whole point, which is to represent a relationship between the members of the structure and columns in a database. This is pretty easy with the C++ pointer-to-member construct, but Ada lacks that construct so you have to instead wrap the data members with a function so you can store an access-to-function. But it's worse, since you will need two functions, one to read the datum and one to set it. > That makes it seem like there is some kind of relation between the > integers; There isn't. > a relation that isn't there with the float or the string. So > it seems natural to group the integers together It's not.