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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,da5197b9dca0ed40 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!b35g2000yqi.googlegroups.com!not-for-mail From: Phil Thornley Newsgroups: comp.lang.ada Subject: Re: Processing array subsections, a newbie question. Date: Sun, 13 Jun 2010 12:04:12 -0700 (PDT) Organization: http://groups.google.com Message-ID: <46bd5d0a-e78c-405b-a0a9-f0c34ed3844f@b35g2000yqi.googlegroups.com> References: <4c13db30$0$2391$4d3efbfe@news.sover.net> <8739wsottd.fsf@ludovic-brenta.org> <9e1f3f35-6f49-468f-be89-46d4f51f8193@f17g2000vbl.googlegroups.com> <4c14e3fd$0$2382$4d3efbfe@news.sover.net> NNTP-Posting-Host: 80.177.171.182 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1276455852 32162 127.0.0.1 (13 Jun 2010 19:04:12 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sun, 13 Jun 2010 19:04:12 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: b35g2000yqi.googlegroups.com; posting-host=80.177.171.182; posting-account=Fz1-yAoAAACc1SDCr-Py2qBj8xQ-qC2q User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:12655 Date: 2010-06-13T12:04:12-07:00 List-Id: On 13 June, 19:39, Yannick Duch=EAne (Hibou57) wrote: > Le Sun, 13 Jun 2010 18:57:14 +0200, Phil Thornley =A0 > a =E9crit:> In the situation you > > describe I would define a type (to replace your use of Natural) that > > has one extra value at the end > > I see what you mean, but ... > Personal feeling: this looks like a trick, would not recommend it. To be = =A0 > short: types should not defined this way. Implementation should be =A0 > adjusted to specification (a type is a part of a specification) and not = =A0 > the opposite, that is, to adapt specifications (types here) to an =A0 > implementation. > That's quite a severe point of view - I would classify the extra value as a 'boundary value' as described in AQ&S 5.3.1 on subtypes. Cheers, Phil