From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-3.2 required=3.0 tests=BAYES_00,NICE_REPLY_A, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Parameterised 'Image Attributes Date: Sun, 20 Aug 2023 11:43:01 +0200 Organization: A noiseless patient Spider Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 20 Aug 2023 09:43:01 -0000 (UTC) Injection-Info: dont-email.me; posting-host="1833338c996432ee36783c463952eb03"; logging-data="1376324"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/jsp62yPKNC9hQ4JCLCkcmMP60FvXRmC8=" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Cancel-Lock: sha1:0aGKG2E+X2dkoHNyo3hqiw5UOY0= Content-Language: en-US In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:65546 List-Id: On 2023-08-20 09:25, Randy Brukardt wrote: > Additionally, one ends up with a magic mechanism that only the compiler can > use. That *never* is a good idea. A better idea would be to improve the language to remove need in magic, but that is *never* a good idea either! (:-)) > Attributes do not allow named parameters outside a few special cases, and > *never* allow reordering of parameters. Does that need to change, too? Elementary! Attribute is just an alternative syntactic form of a subroutine call. There is no reason why attribute should be limited to look like FORTRAN IV! (:-)) > 'Image is convinient for integer and enumeration output, and one can format > them in the rare case where that is necessary. But it is useless for float > output -- manual reformatting the output of 'Image would round the results > incorrectly. Which is why Float 'Image must have parameters! > Ada has few built-in facilities because it's primary purpose is to support > the development of proper ADTs. Ease of writing is not a goal at all, and in > most cases, the extra text is valuable to compilers and tools (even if it is > not so valuable to human readers). How is this related to attribute 'Image lacking necessary parameters? Why generic function having such parameters is OK, while 'Image with same parameters is not? -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de