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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,6327f05d4989a68d X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.180.79.228 with SMTP id m4mr8394851wix.7.1356837413594; Sat, 29 Dec 2012 19:16:53 -0800 (PST) Path: i11ni337233wiw.0!nntp.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.139.MISMATCH!xlned.com!feeder7.xlned.com!newsfeed10.multikabel.net!multikabel.net!newsfeed20.multikabel.net!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!border4.nntp.ams.giganews.com!border2.nntp.ams.giganews.com!nntp.giganews.com!newsreader4.netcologne.de!news.netcologne.de!news.swapon.de!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Press Release - Ada 2012 Language Standard Approved by ISO Date: Thu, 27 Dec 2012 16:30:15 +0100 Organization: cbb software GmbH Message-ID: References: <7wrdmbre6jw9.qww9l0uzj6mg.dlg@40tude.net> <14oqoq06zhlu2.tcasif3hdyhw.dlg@40tude.net> <1drh1q1ln2dfh$.a9hwlg01fjfy.dlg@40tude.net> <50d6365d$0$6577$9b4e6d93@newsspool3.arcor-online.net> <1pbg79bz92j3t$.sz41zduivjfp.dlg@40tude.net> <4c101d74-c8cb-45a6-82d4-91923bb950b0@googlegroups.com> <87sj6tre9s.fsf@mid.deneb.enyo.de> <895c9eb7-03f8-4b0c-96b4-3dbd7a315ccd@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 6/SyjDFvQ5V7ZR2+GYgbDQ.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-12-27T16:30:15+01:00 List-Id: On Thu, 27 Dec 2012 06:29:02 -0800 (PST), sbelmont700@gmail.com wrote: > I've yet to be convinced of a case where its > necessary/preferable/best-structured to propogate an exception out to be > handled by the client instead of making the client check it beforehand. Like checking a 100_000 x 100_000 matrix for being singular before actually inverting it? > You show me a subprogram that raises End_Error and I'll show you a > subprogram that needs a precondition "not At_End". Terminal I/O, stream I/O, sockets. EOF is computable only once, most of the time. Hard-drive file systems represent a rare exception from the rule. And as with the example of matrix inversion, checking for EOF might be utterly inefficient even when dealing with a HDD. > If you are rasising "File_Not_Found" then you need a precondition of >"File_Exists". And a nice race condition coming with that! Never use File_Exists if you can. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de