comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Parameterised 'Image Attributes
Date: Mon, 28 Aug 2023 21:08:16 +0200	[thread overview]
Message-ID: <ucirat$1qtv1$2@dont-email.me> (raw)
In-Reply-To: <ucilpv$1psc9$1@dont-email.me>

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

  reply	other threads:[~2023-08-28 19:08 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-18  7:18 Parameterised 'Image Attributes Rod Kay
2023-08-18  8:25 ` Luke A. Guest
2023-08-19  9:14   ` J-P. Rosen
2023-08-19 10:03     ` Dmitry A. Kazakov
2023-08-19 11:45       ` Luke A. Guest
2023-08-19 11:56       ` J-P. Rosen
2023-08-19 13:01         ` Dmitry A. Kazakov
2023-08-19 15:27     ` Jeffrey R.Carter
2023-08-20  7:53       ` G.B.
2023-08-20  9:27         ` Dmitry A. Kazakov
2023-08-21 23:11           ` Randy Brukardt
2023-08-21 23:37           ` Randy Brukardt
2023-08-22  7:38             ` Dmitry A. Kazakov
2023-08-19 16:49     ` moi
2023-08-20  7:25       ` Randy Brukardt
2023-08-20  9:43         ` Dmitry A. Kazakov
2023-08-21 23:34           ` Randy Brukardt
2023-08-22  8:13             ` Dmitry A. Kazakov
2023-08-23 10:20               ` Stephen Davies
2023-08-23 16:16                 ` Dmitry A. Kazakov
2023-08-24 19:59                   ` Stephen Davies
2023-08-25  7:26                     ` Dmitry A. Kazakov
2023-08-25  9:04                       ` Stephen Davies
2023-08-25 13:02                         ` Dmitry A. Kazakov
2023-08-28  9:18                           ` Stephen Davies
2023-08-28 10:58                             ` Dmitry A. Kazakov
2023-08-28 15:42                               ` Stephen Davies
2023-08-28 16:09                                 ` Dmitry A. Kazakov
2023-08-28 17:33                                   ` G.B.
2023-08-28 19:08                                     ` Dmitry A. Kazakov [this message]
2023-08-28 17:58                               ` Niklas Holsti
2023-08-28 19:08                                 ` Dmitry A. Kazakov
2023-09-07  1:04                               ` Randy Brukardt
2023-09-07  9:01                                 ` Dmitry A. Kazakov
2023-08-18 18:53 ` Keith Thompson
2023-09-23 10:00 ` Rod Kay
2023-09-26  5:47   ` Vadim Godunko
2023-09-26 10:15     ` Rod Kay
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox