From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Better way to fill Storage_IO? Date: Thu, 20 May 2021 08:50:37 +0200 Organization: Adalog Message-ID: References: <3cfe02b8-18d3-4673-b808-48ad29092517n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Thu, 20 May 2021 06:50:35 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="220a71665d3acf0f4960dbbf373ce8a7"; logging-data="23542"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+oUz2YpvoubdVMkV13ppsr" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 Cancel-Lock: sha1:6Hms3K6pHiYSdpoFbh7awHMFVWE= In-Reply-To: Content-Language: fr Xref: reader02.eternal-september.org comp.lang.ada:62017 List-Id: Le 20/05/2021 à 07:38, Niklas Holsti a écrit : > What could the RM say, as motivation? Your karma will decrease 5 points > every time you use 'Image for regular IO? Or every such use brings a > 1/10000 chance of aborting the program or producing wrong results? :-) The concern I have with 'Image is that it provides no formatting. Also for file IO, Put(I) (from Integer_IO) is better than Put(Integer'Image(I)), because the former will never break the value on two lines, while the latter can if the line length is bounded, making the value impossible to read later. Of course, uses other than file IO do not have this constraint. The concern I have with Obj'Image is that there is no clean model of what it is. All other attributes are properly defined as predefined functions with a profile, they can be used to instantiate generics, etc. "X'Image denotes the result of calling function S'Image with Arg being X, where S is the nominal subtype of X." So, it's a special notation, like a kind of macro, with no proper definition. This hurts my purist's state of mind... -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52 https://www.adalog.fr