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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c80e6f742e73478f X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!news.mixmin.net!feeder.eternal-september.org!eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Ensuring postconditions in the face of exceptions Date: Mon, 15 Mar 2010 15:16:12 +0100 Organization: Adalog Message-ID: References: <820d96c0-5d67-4b8c-8c5b-811ca4f1127e@g26g2000yqn.googlegroups.com> <8990d686-f703-4e9c-91b7-32410289983d@g11g2000yqe.googlegroups.com> <87ljdv56gy.fsf@ludovic-brenta.org> <5f3f45c6-0202-4a67-8517-182afaf7dceb@c16g2000yqd.googlegroups.com> <3782da9f-3f92-455e-ac1c-7cab721fc4df@d2g2000yqa.googlegroups.com> <8e4c1204-f8a3-4cf5-801e-c6f51eab0ac6@i25g2000yqm.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Mon, 15 Mar 2010 14:16:13 +0000 (UTC) Injection-Info: feeder.eternal-september.org; posting-host="Dn22F68J9CHYFQQlT81DGA"; logging-data="5546"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19+ZjI653hBCqezUY6CFaDt" User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) In-Reply-To: <8e4c1204-f8a3-4cf5-801e-c6f51eab0ac6@i25g2000yqm.googlegroups.com> Cancel-Lock: sha1:RWV1Dc2zWWOScU/0KRNCb3CdFs4= Xref: g2news2.google.com comp.lang.ada:10546 Date: 2010-03-15T15:16:12+01:00 List-Id: Ludovic Brenta a �crit : >> May be a (6) option is to create a tagged type ? > > I see this as a variant of (2) and has the same drawbacks. In this > case I would have to explain why I use a tagged type that has no > primitive operations (the procedure Refresh does not have to be > primitive for this type) and no type extensions . > Proposal (7): Make Dirty a (limited) private type -say Status- with functions Is_Dirty and Is_Clean. You are then free to implement it as a by-reference type. If it's a mess, hide it... -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr