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: 103376,243dc2fb696a49cd X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news1.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newshosting.com!nx01.iad01.newshosting.com!news-peer0-test!btnet-feed5!btnet!carbon.eu.sun.com!new-usenet.uk.sun.com!not-for-mail From: Ole-Hjalmar Kristensen Newsgroups: comp.lang.ada Subject: Re: Ada Popularity: Comparison of Ada/Charles with C++ STL (and Perl) Date: 04 Oct 2004 11:02:05 +0200 Organization: Sun Microsystems Message-ID: References: <1700922.2nPlMsa4Ny@linux1.krischik.com> <1636756.M7hCqjsVMv@linux1.krischik.com> <4c2ec8a8.0410012248.2708edd2@posting.google.com> NNTP-Posting-Host: khepri06.norway.sun.com Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: new-usenet.uk.sun.com 1096880527 1771 129.159.112.195 (4 Oct 2004 09:02:07 GMT) X-Complaints-To: usenet@new-usenet.uk.sun.com NNTP-Posting-Date: 4 Oct 2004 09:02:07 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2 Xref: g2news1.google.com comp.lang.ada:4648 Date: 2004-10-04T09:02:07+00:00 List-Id: >>>>> "K" == K writes: K> 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. K> No, I think that you are missing the whole point, which is to K> represent a relationship between the members of the structure and K> columns in a database. K> This is pretty easy with the C++ pointer-to-member construct, but Ada K> lacks that construct so you have to instead wrap the data members with K> a function so you can store an access-to-function. But it's worse, K> since you will need two functions, one to read the datum and one to K> set it. A plain pointer works just fine for binding data members to columns in a database, so you don't need the special pointer-to-member construct in this case.