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: Mon, 28 Aug 2023 21:08:16 +0200 Organization: A noiseless patient Spider Message-ID: References: <4c861cba-9ad6-429d-b530-a40c45dfc176n@googlegroups.com> <41ae24fb-793e-4bb7-9086-c8923ddc5d9dn@googlegroups.com> <12fb20e0-8fc7-4eec-a959-e94fd3106976n@googlegroups.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Mon, 28 Aug 2023 19:08:13 -0000 (UTC) Injection-Info: dont-email.me; posting-host="5a879763e13e5c6e904f542db0b53b64"; logging-data="1931233"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/rjO4yJBhXmPS3pIbMJVauQMJGoAF/wIg=" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Cancel-Lock: sha1:PA3VTHZqE+sQuYo/gfA43QXs/Y8= Content-Language: en-US In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:65572 List-Id: On 2023-08-28 19:33, G.B. wrote: > On 28.08.23 18:09, Dmitry A. Kazakov wrote: >> On 2023-08-28 17:42, Stephen Davies wrote: >>> On Monday, 28 August 2023 at 11:58:24 UTC+1, Dmitry A. Kazakov wrote: >>>> On 2023-08-28 11:18, Stephen Davies wrote: >>>> This will not happen either. But here I would agree, it is clearly a >>>> case of language littering. >>> >>> Littering, schmittering, how about adding Bin_Image, Oct_Image & >>> Hex_Image >>> for Ints and Dec_Image for Ints & Reals ;-) >> >> Bin_Width_1_Image, Dec_Width_4_Image and so on... Cool, make Ada C >> again! (:-)) > > Or maybe leave type attributes alone. Instead, let Ada.Streams > have I/O manipulating setters. > > Then,  in order to preserve the meaning of "corresponding S'Output" > (LRM 13.13.2) for every S'Input, add AI to the Ada run-time system. I like the idea of unification of serialization and formatting. However it does not solve the problem of parameters. In GUI frameworks facing this very problem the parameters for rendering are set into the graphic context/surface. E.g. in the case of string formatting you would need a global object to set the parameters into. E.g. a set of procedures like Ada.Text_IO.Set_Field_Width, Ada.Text_IO.Set_Integer_Base etc. That would be incredibly boring and unsafe. For stream serialization the parameters could be set on the stream itself. Which might break a lot of code if you added them to Root_Stream_Type. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de