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,6327f05d4989a68d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 X-Received: by 10.180.83.101 with SMTP id p5mr93099wiy.0.1357932973204; Fri, 11 Jan 2013 11:36:13 -0800 (PST) Path: o9ni7305wio.1!nntp.google.com!proxad.net!feeder1-2.proxad.net!usenet-fr.net!gegeweb.org!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: File_Exists (Was: Press Release - Ada 2012 Language Standard Approved by ISO) Date: Fri, 11 Jan 2013 20:36:11 +0100 Organization: Ada @ Home 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> <87obgvr8ti.fsf_-_@adaheads.sparre-andersen.dk> NNTP-Posting-Host: aWaWeUaBdaj2Zzc04J1v5A.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/12.12 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2013-01-11T20:36:11+01:00 List-Id: Le Fri, 11 Jan 2013 17:19:37 +0100, Jacob Sparre Andersen = a =C3=A9crit: > Dmitry A. Kazakov wrote: > >> Never use File_Exists if you can. > > One of my colleagues could come up with a sensible use case for > "File_Missing": When a web service wants to know if it should ask a us= er > to upload a profile image (stored in a file). > > Some applications use the existence of certain files as a simple > external management interface. Although I consider this bad style and= > prefer a socket based management interface, it might be considered a > reasonable use as well. > > Can anybody supply some other sensible use cases for > File_Exists/File_Missing. A build system? (not restricted to building applications). One may want = to = check if the file exist, instead of trying to create or open it for = rewrite and only then getting an exception if the file does not exist. -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [1] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [1] [1]: Epigrams on Programming =E2=80=94 Alan J. =E2=80=94 P. Yale Univers= ity