comp.lang.ada
 help / color / mirror / Atom feed
From: Brian.Gaffney@myrealbox.com (Brian Gaffney)
Subject: Re: Optimizing Boundary Checks
Date: 18 Jun 2003 13:58:51 -0700
Date: 2003-06-18T20:58:51+00:00	[thread overview]
Message-ID: <5e9b8c34.0306181258.54912aad@posting.google.com> (raw)
In-Reply-To: bck9e8$i1s1h$5@ID-175126.news.dfncis.de

Vinzent Hoefler <ada.rocks@jlfencey.com> wrote in message news:<bck9e8$i1s1h$5@ID-175126.news.dfncis.de>...
> Robert I. Eachus wrote:
> 
> >Vinzent Hoefler wrote:
> >
> > > I can imagine situations (especially with subtypes) where it could be
> > > handy to use the variables' type instead of an explicit type
> > > specification.
> >
> >You will need a better justification than that!
> 
> Of course.
> 
> >But there is one. ;-)  A discrete variable declaration can have an 
> >explict range in its subtype indication:
> >
> >Size: Integer range 0 .. 1000;
> 
> Well, IMO that's bad style anyway.
> 
Vinzent,
   It doesn't matter if you like the justification, as long as you get
the feature you want ;-)

   I would think there would be another argument for this, similar to
the argument for using constants.  Just as you don't want hard-coded
values sprinkled through your code because you might need to change
their values, you may not want hard-coded types since you might want
to change the (sub)type of an object.

   I don't think either of these arguments is very strong, but I can't
imagine implementing this would be too difficult (famous last words!).

                     --Brian



  reply	other threads:[~2003-06-18 20:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-13 11:49 Optimizing Boundary Checks Preben Randhol
2003-06-13 12:03 ` Erlo Haugen
2003-06-13 12:38   ` Vinzent Hoefler
2003-06-13 12:47     ` Preben Randhol
2003-06-13 13:28       ` Vinzent Hoefler
2003-06-13 12:42   ` Preben Randhol
2003-06-13 12:48     ` Preben Randhol
2003-06-13 13:28       ` Vinzent Hoefler
2003-06-13 13:56         ` Preben Randhol
2003-06-13 14:42           ` Vinzent Hoefler
2003-06-13 15:25             ` Preben Randhol
2003-06-13 15:34               ` Vinzent Hoefler
2003-06-14 10:45                 ` Preben Randhol
2003-06-14 14:59                   ` James Rogers
2003-06-13 13:33       ` Peter Amey
2003-06-13 13:34 ` Martin Dowie
2003-06-13 13:48   ` Vinzent Hoefler
2003-06-13 14:37     ` Martin Dowie
2003-06-13 15:12       ` Vinzent Hoefler
2003-06-14  2:01         ` Jeffrey Carter
2003-06-16 11:23           ` Vinzent Hoefler
2003-06-14  8:34         ` Dmitry A. Kazakov
2003-06-14 17:20         ` Robert I. Eachus
2003-06-16 11:23           ` Vinzent Hoefler
2003-06-18 20:58             ` Brian Gaffney [this message]
2003-06-13 13:45 ` Dale Stanbrough
replies disabled

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