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=unavailable 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: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: function Is_Open (File : File_Type) return Boolean; :Text_io Date: Fri, 30 Oct 2015 10:11:26 +0100 Organization: A noiseless patient Spider Message-ID: References: <87twpd2qlo.fsf@theworld.com> <1pj15r7pul7f1.15qgdyrc8k133$.dlg@40tude.net> <87pp0030c1.fsf@theworld.com> <135hiczk56x02.1xixcme8btbl4.dlg@40tude.net> <1dzlgoh4u2j7t$.1un3dfy0oeigd$.dlg@40tude.net> <190shqocxd87d$.1d68ghgqgbvfs$.dlg@40tude.net> <87d1vy3f46.fsf@theworld.com> <7e1b4b17-c769-4aa5-a085-a2ccf2ac75ea@googlegroups.com> <1quu0fn66x4br$.1f1x6de5oto9u$.dlg@40tude.net> <87611og3ry.fsf@adaheads.sparre-andersen.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 30 Oct 2015 09:09:16 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="45bffd6a911624777cad79aac3181090"; logging-data="9863"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+bwdAxQCWJ6im8OOmbybJx" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: <87611og3ry.fsf@adaheads.sparre-andersen.dk> Cancel-Lock: sha1:tEk9svBll1yk8B1CVE9Ndswq3DE= Xref: news.eternal-september.org comp.lang.ada:28125 Date: 2015-10-30T10:11:26+01:00 List-Id: Le 30/10/2015 09:27, Jacob Sparre Andersen a écrit : > The kind of comments which make sense to me are those which contain a > reference to a detailed explanation of why something is done the way it > is. I.e. a reference to a mathematical statement, a paper describing an > algorithm or a performance analysis of two competing algorithms. I agree with you, it is always better to express something in the code rather than in comments, if possible. But there is a case that cannot be expressed in code, and must therefore be given as comments: explaining why you did NOT do something in a certain (and generally more obvious) way. -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr