comp.lang.ada
 help / color / mirror / Atom feed
From: "Mark Lundquist" <mark@rational.com>
Subject: Re: Built-in types (was Re: How can I avoid Using a Semaphore?
Date: Fri, 2 Feb 2001 14:03:18 -0800
Date: 2001-02-02T14:03:18-08:00	[thread overview]
Message-ID: <95fbj3$nen$8@usenet.rational.com> (raw)
In-Reply-To: 94km00$bv8$1@nnrp1.deja.com


Robert Dewar <robert_dewar@my-deja.com> wrote in message
news:94km00$bv8$1@nnrp1.deja.com...
> In article <94ifq8$uu$1@usenet.rational.com>,
>   "Mark Lundquist" <mark@rational.com> wrote:
> > It's certainly no worse than Integer, but I'm not
> > convinced that it's all *that* much better from the
> > standpoint of
> > portability, resilience to change etc. (remember, this is the
> > case where I
> > truly *don't* *care* about the unspecified properties).
>
> The point is that it emphasizes to the reader what is going on,
> and indeed it is more portable than Integer, if for example,
> the range is greater than 16 bits (remember that that is all
> you can depend on from type Integer).

If you need it to be "portable" in this aspect, then you do "care", and you
should not use Integer which means "don't care".  But I am talking about
when you -- one more time :-) -- don't care.

>
> The trouble once again with using naked Integer is that I
> cannot tell *why* you made this choice, and likely the reason
> is just incompetence :-)

Yeah, probably so :-)

But I can't see how overspecification leaves the reader any less blind to
the author's intent.  How is the reader to distinguish specification of
things you are depending on from that of things that you don't depend on?

>
>
> > type that is fully specified, leaving nothing to the
> > implementation-specific defaults.
>
> Such as the representation in bits, which can NOT be
> specified???

Of course not.  Read carefully, I said "leaving nothing to the
implementation-specific *defaults*" (if you can't specify it, it's not a
default, it's just implementation-specific).  Once again, what are all the
things
that can be specified?  I said what I thought after consulting the RM, and
you said there were more things that I missed -- what are they?  And in your
standard technique, do you define all those things for your "My_Int"?  If
not, why not?

>
> > Why did you derive My_Int from Temp_Int, instead of defining
> > it as you did Temp_Int?
>
> You completely missed the point of my declarations, have a look
> at them again! The 'Base is the WHOLE POINT of these
> declarations. So perhaps you want to look again, and perhaps
> your comments were based on not understanding the technique
> here (which for me is an absolutely standard one).

That's just the thing, I don't understand the technique :-).  I admit to
being clueless about it, and I would like to have someone explain it to me.

>
> >     type Temp_Int is range Integer'first .. Integer'last;
>
> That's pointless, it is just equivalent to
>
>    type Temp_Int is new Integer;

Yes, just as I thought... that's why I elaborated, I'm trying to figure out
at what point you object to Integer -- is it just that the range is not
nailed to the floor?

Best Regards
Mark Lundquist








  parent reply	other threads:[~2001-02-02 22:03 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-01-13 16:18 How can I avoid Using a Semaphore? (long) DuckE
2001-01-15  1:06 ` How can I avoid Using a Semaphore? Nick Roberts
2001-01-15  3:17   ` Robert Dewar
2001-01-16  3:53   ` DuckE
2001-01-17 15:42     ` Nick Roberts
2001-01-20 18:16       ` DuckE
2001-01-20 19:16         ` Robert Dewar
2001-01-21  1:28           ` DuckE
2001-01-21 16:04             ` Robert Dewar
2001-01-21 23:23               ` DuckE
2001-01-22  0:28                 ` mark_lundquist
2001-01-22  1:51                 ` Robert Dewar
2001-01-23  2:36                   ` DuckE
2001-01-22  0:35               ` Built-in types (was " mark_lundquist
2001-01-22  1:54                 ` Robert Dewar
2001-01-22 16:18                   ` mark_lundquist
2001-01-22 17:20                     ` Robert Dewar
2001-01-22 23:17                       ` Mark Lundquist
     [not found]                         ` <m33deaaeks.fsf@ns40.infomatch.bc.ca>
2001-02-02 22:01                           ` Mark Lundquist
     [not found]                         ` <94km00$bv8$1@nnrp1.deja.com>
2001-02-02 22:03                           ` Mark Lundquist [this message]
2001-01-21 16:53           ` Nick Roberts
2001-01-21 18:24             ` Robert Dewar
2001-01-23  0:21               ` Nick Roberts
2001-01-22  0:16         ` mark_lundquist
2001-01-22 16:51 ` How can I avoid Using a Semaphore? (long) mark_lundquist
2001-01-23  6:02   ` DuckE
2001-02-02 22:00     ` Sucking (was Re: How can I avoid Using a Semaphore? (long)) Mark Lundquist
2001-02-03  1:44       ` Jeffrey Carter
2001-02-03  3:21       ` DuckE
2001-02-05 20:07         ` Mark Lundquist
2001-02-06  7:16           ` Sven Nilsson
2001-02-02 22:18     ` How can I avoid Using a Semaphore? (long) Mark Lundquist
2001-02-03  3:01       ` DuckE
2001-02-02 21:38 ` Niklas Holsti
replies disabled

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