comp.lang.ada
 help / color / mirror / Atom feed
From: "martin.m.dowie" <martin.m.dowie@ntlworld.com>
Subject: Re: type declaration and storage requirements
Date: Mon, 3 Jun 2002 12:19:40 +0100
Date: 2002-06-03T12:19:40+01:00	[thread overview]
Message-ID: <mhIK8.42391$wd3.6730984@news6-win.server.ntlworld.com> (raw)
In-Reply-To: bebbba07.0206022258.5653ecac@posting.google.com

"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.







  parent reply	other threads:[~2002-06-03 11:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-02 21:21 type declaration and storage requirements Russ
2002-06-02 23:54 ` martin.m.dowie
2002-06-03  0:40   ` Dale Stanbrough
2002-06-03 11:10     ` martin.m.dowie
2002-06-04  2:40       ` Dale Stanbrough
2002-06-03  6:58   ` Russ
2002-06-03  7:57     ` AG
2002-06-03 11:19     ` martin.m.dowie [this message]
2002-06-03 12:40     ` Larry Kilgallen
2002-06-03 13:12     ` Gautier
2002-06-03  2:26 ` Jeffrey Carter
2002-06-04 10:35 ` Simon Wright
2002-06-04 13:04   ` Martin Dowie
2002-06-06  8:06     ` Simon Wright
2002-06-11  7:18 ` David Thompson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox