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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: "G.B." Newsgroups: comp.lang.ada Subject: Re: function Is_Open (File : File_Type) return Boolean; :Text_io Date: Tue, 27 Oct 2015 17:41:04 +0100 Organization: A noiseless patient Spider Message-ID: References: <87twpd2qlo.fsf@theworld.com> <1pj15r7pul7f1.15qgdyrc8k133$.dlg@40tude.net> Reply-To: nonlegitur@futureapps.de Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 27 Oct 2015 16:38:44 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="b96887e80893c84a90c3007226ca0d1c"; logging-data="3898"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/EW/GyFRqb1U9o4pHQwNXOfBJVVQinxlA=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: Cancel-Lock: sha1:8M+dbxFZ2/CsfPp0EQlXwmiFPbM= Xref: news.eternal-september.org comp.lang.ada:28078 Date: 2015-10-27T17:41:04+01:00 List-Id: On 27.10.15 16:10, Dmitry A. Kazakov wrote: > On Tue, 27 Oct 2015 15:02:18 +0100, G.B. wrote: > >> On 27.10.15 09:30, Dmitry A. Kazakov wrote: >>> Yes, but you cannot put a constraint on an existing object. >> >> Why would that be important, given objects' states, and also >> type conversions? > > That was not my point. The point is that the object is the example at hand > is unconstrained. It is valid and a *use case* for a log file to be closed. O.K., as I read it, Bob's reply works convincingly if considered rather self-contained. And with reference to typical logging situations? (I agree that there are varying expectations regarding a log file, one implied by the example, viz. writing only if the file is open and silently "ignoring" the call otherwise. But this seems a rather far fetched setup to me. I'd expect that a log file that is not in an open state should raise, degrees of verbosity of logging being part of configuration. A specific exception pinpoints the error.)