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-Thread: 103376,da5197b9dca0ed40 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!news.mb-net.net!open-news-network.org!aioe.org!not-for-mail From: =?iso-8859-15?Q?Yannick_Duch=EAne_=28Hibou57=29?= Newsgroups: comp.lang.ada Subject: Re: Processing array subsections, a newbie question. Date: Sun, 13 Jun 2010 20:39:07 +0200 Organization: Ada At Home Message-ID: 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: BIOCWHa1003G4Wn+vUItTQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: Opera Mail/10.53 (Win32) Xref: g2news1.google.com comp.lang.ada:11682 Date: 2010-06-13T20:39:07+02:00 List-Id: Le Sun, 13 Jun 2010 18:57:14 +0200, Phil Thornley = 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= = short: types should not defined this way. Implementation should be = adjusted to specification (a type is a part of a specification) and not = = the opposite, that is, to adapt specifications (types here) to an = implementation. -- = There is even better than a pragma Assert: a SPARK --# check. --# check C and WhoKnowWhat and YouKnowWho; --# assert Ada; -- i.e. forget about previous premises which leads to conclusion -- and start with new conclusion as premise.