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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,df40d0d1975a16a6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-18 13:58:52 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: Brian.Gaffney@myrealbox.com (Brian Gaffney) Newsgroups: comp.lang.ada Subject: Re: Optimizing Boundary Checks Date: 18 Jun 2003 13:58:51 -0700 Organization: http://groups.google.com/ Message-ID: <5e9b8c34.0306181258.54912aad@posting.google.com> References: <3EEB5934.1000107@attbi.com> NNTP-Posting-Host: 137.244.215.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1055969931 28662 127.0.0.1 (18 Jun 2003 20:58:51 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 18 Jun 2003 20:58:51 GMT Xref: archiver1.google.com comp.lang.ada:39410 Date: 2003-06-18T20:58:51+00:00 List-Id: Vinzent Hoefler wrote in message news:... > 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