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,b78c363353551702 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.68.196.232 with SMTP id ip8mr23780164pbc.6.1340225493200; Wed, 20 Jun 2012 13:51:33 -0700 (PDT) Path: l9ni207pbj.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: about the new Ada 2012 pre/post conditions Date: Wed, 20 Jun 2012 13:51:32 -0700 (PDT) Organization: http://groups.google.com Message-ID: <218d3055-5610-491f-9f9f-5b08dbdbc720@googlegroups.com> References: <4f0d55a9-83e1-44fe-8943-0c73a34a594d@googlegroups.com> NNTP-Posting-Host: 83.3.40.82 Mime-Version: 1.0 X-Trace: posting.google.com 1340225493 29304 127.0.0.1 (20 Jun 2012 20:51:33 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 20 Jun 2012 20:51:33 +0000 (UTC) Cc: nma@12000.org In-Reply-To: <4f0d55a9-83e1-44fe-8943-0c73a34a594d@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=83.3.40.82; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S User-Agent: G2/1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Date: 2012-06-20T13:51:32-07:00 List-Id: W dniu =C5=9Broda, 20 czerwca 2012 22:16:44 UTC+2 u=C5=BCytkownik Jeffrey R= . Carter napisa=C5=82: > Decades of experience show that it will usually be used as: >=20 > Dummy :=3D Push (S, Element); > etc... Yes. > This is part of the reason exceptions exist. >=20 > If Push raises an exception, rather than returning an error code/flag, th= en the caller either has to handle that exception, Decades of experience (OK, Java is a bit younger) show that it will usually= be used as: begin Push (S, Element); exception when others =3D> null; -- TODO: (errr, it never happens, right?) end; The first version is at least easier to follow in the debugger... --=20 Maciej Sobczak * http://www.msobczak.com * http://www.inspirel.com