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,4f1dddd3318e056d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-03 04:19:49 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!small.news.tele.dk!194.25.134.62!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newspeer1-gui.server.ntli.net!ntli.net!news6-win.server.ntlworld.com.POSTED!not-for-mail From: "martin.m.dowie" Newsgroups: comp.lang.ada References: Subject: Re: type declaration and storage requirements X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: Date: Mon, 3 Jun 2002 12:19:40 +0100 NNTP-Posting-Host: 213.104.121.73 X-Complaints-To: abuse@ntlworld.com X-Trace: news6-win.server.ntlworld.com 1023103186 213.104.121.73 (Mon, 03 Jun 2002 12:19:46 BST) NNTP-Posting-Date: Mon, 03 Jun 2002 12:19:46 BST Organization: ntlworld News Service Xref: archiver1.google.com comp.lang.ada:25249 Date: 2002-06-03T12:19:40+01:00 List-Id: "Russ" <18k11tm001@sneakemail.com> wrote in message news:bebbba07.0206022258.5653ecac@posting.google.com... > > [snip] > > > > I think the argument here is - "Why do you care?" > > Why do I care about how much storage I use? Maybe I'm just obsessive, > but I would like to know if I am using single or double precision. Is > that so unreasonable? No, but I tend to just try and ensure I've got the ranges/digits/delta/alignments ok and let the compiler choose what is most optimal. Even in the embedded systems I work in, actual underlying representations of internal types/objects comes way down my list of 'this to check for inefficiencies'. I'll repeat my caveat - "except when I'm defining messages for external interfaces" > I don't care what kind of "issue" you want to label it. I just want to > know whether I am using single or double precision. And what is the > point of specifying the number of digits if the compiler is just going > to choose one or two words? If I choose less than 7 digits, I probably > get single precision, but if I choose 7 (8?) or more I probably get > double precision. If you choose 7 digits the compiler will give you a size that will accomodate that. My understanding is that it would be free to give you double precision if it deemed that the most efficient for the particular target. > It's like going to a bank where they ask you, "What is the minimum > amount of money you wish to withdraw?" If you ask for $100 or less, > you get $100, but if you ask for more than $100, you get $200. What is > the point of pretending that you get to specify the amount precisely > if you don't? Wouldn't it make more sense to just ask if you want $100 > or $200? No I don't think it is like that. My view of Ada typing is that it offers an 'abstract view' rather than absolute underlying representations (unless that is what you specify). The compiler will always ensure that your minimum requirements are met but that it is free to 'actually' implement it in prett y much anyway it sees fit.