comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: The simple Image issue
Date: Wed, 31 Aug 2011 23:58:31 +0200
Date: 2011-08-31T23:58:31+02:00	[thread overview]
Message-ID: <4e5eae87$0$7624$9b4e6d93@newsspool1.arcor-online.net> (raw)
In-Reply-To: <dccd795f-4ed7-4f3f-8071-febebd01bf78@r40g2000prf.googlegroups.com>

On 31.08.11 18:43, Adam Beneschan wrote:
> On Aug 31, 9:34 am, Georg Bauhaus<rm.dash-bauh...@futureapps.de>
> wrote:
>
>>>> True when there is an object; but what about
>>
>>>>    (some expression)'Value ?
>>
>>> Use T(expression)'Value when you must.
>>
>> Even so,
>>
>>   X := T'(if condition then
>>            1.2
>>           else
>>            3.5)'Value;
>
> Hang on... doesn't the argument of 'Value need to be a string?  I
> think this conversation took a wrong turn up there---you all meant
> 'Image, right?

OK, yes, I was too, uh, quick, I meant "1.2" and "3.5 and so on.

I'll like the polymorphing Value function best.
But Dmitry mentions objects as the result of parsing.

To me, this seems more about persistent objects than about
something that assists newcomers with quickly writing values
(of numbers and of enums) in and out.  Isn't persistence better
served by 'Output and 'Input?

Isn't part of the argument about the gap between untagged and
tagged types?


Rather than changing 'image and 'value, some Ada effort, IMHO,
is better directed towards the creation of a flexible, portable
tracing package, if tracing seems to dominate the use cases of
quick 'Img.  Would it work?  Starting from:

   procedure P ...
     X : ...
   begin
     ...
     put_line (current_error, "In P, value X is="
                             & T'image(X));

I'd imagine a portable compiler magic package:

   package Source_Info is ...


   trace : Source_Info.T;

   Trace.Set_Output (Current_Error);

   procedure P ...
     X : ...
   begin
     ...
     Trace.Debug ("value X is=", X);
  
I am assuming that the compiler will be determining procedure
P's full name, and can either infer the type of X and then select
or synthesize a suitable transformation function, or will ask the user
for assistance as necessary. The output format can be configured, etc.

I cannot imagine a project where such a package would not be
used.

Maybe it is irritating that there should be procedures that
have more magic than others.  Some syntax should help lessen the
surprise.

A magic trace package is even easier to use for newcomers and
programmers alike. It is also portable, unlike 'Img.

Fancy words like "compiler assisted code injection" etc. will
allow marketing.


Come to think of it, Eiffel has a reserved word, "debug",
not sure about compiler magic for source info.



  reply	other threads:[~2011-08-31 21:58 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-29 15:46 Address and bit mask milouz
2011-08-29 16:06 ` Martin
2011-08-29 16:33   ` milouz
2011-08-29 17:47     ` Dmitry A. Kazakov
2011-08-29 17:54     ` Martin
2011-08-29 18:46     ` tmoran
2011-08-29 19:41 ` Ludovic Brenta
2011-08-29 19:54   ` Adam Beneschan
2011-08-30  9:14     ` milouz
2011-08-30 10:34       ` Ludovic Brenta
2011-08-30 10:58         ` Ludovic Brenta
2011-08-30 12:44           ` Georg Bauhaus
2011-08-30 14:04             ` Dmitry A. Kazakov
2011-08-30 16:12               ` Georg Bauhaus
2011-08-30 16:59                 ` Dmitry A. Kazakov
2011-08-30 14:52         ` Adam Beneschan
2011-08-30 10:40       ` Simon Wright
2011-08-30 10:44         ` Simon Wright
2011-08-30 15:20         ` tmoran
2011-08-30 16:08           ` milouz
2011-08-30 16:45             ` Georg Bauhaus
2011-08-30 19:31               ` Adam Beneschan
2011-08-30 19:56                 ` Dmitry A. Kazakov
2011-08-31  6:16                   ` The simple Image issue (was: Address and bit mask) Georg Bauhaus
2011-08-31 14:44                     ` The simple Image issue Dmitry A. Kazakov
2011-08-31 15:36                       ` Georg Bauhaus
2011-08-31 15:53                         ` Dmitry A. Kazakov
2011-08-31 16:23                           ` Georg Bauhaus
2011-08-31 16:27                             ` Dmitry A. Kazakov
2011-08-31 16:30                               ` Georg Bauhaus
2011-08-31 16:50                                 ` Dmitry A. Kazakov
2011-08-31 20:41                                   ` Georg Bauhaus
2011-08-31 21:17                                     ` Robert A Duff
2011-09-01  7:36                                       ` Dmitry A. Kazakov
2011-09-01  7:46                                     ` Dmitry A. Kazakov
2011-09-01  9:50                                       ` Overloading parentheses and type expectations (was: The simple Image issue) Georg Bauhaus
2011-09-02  7:54                                         ` Overloading parentheses and type expectations Dmitry A. Kazakov
2011-09-02 10:37                                           ` Georg Bauhaus
2011-09-02 12:40                                             ` Dmitry A. Kazakov
2011-09-02 16:08                                               ` Georg Bauhaus
2011-09-02 17:29                                                 ` Dmitry A. Kazakov
2011-08-31 15:53                     ` The simple Image issue Hyman Rosen
2011-08-31 16:07                       ` Dmitry A. Kazakov
2011-08-31 16:08                       ` Simon Wright
2011-08-31 16:26                         ` Dmitry A. Kazakov
2011-08-31 16:25                       ` Georg Bauhaus
2011-08-31 16:30                         ` Hyman Rosen
2011-08-31 16:34                           ` Georg Bauhaus
2011-08-31 16:43                             ` Adam Beneschan
2011-08-31 21:58                               ` Georg Bauhaus [this message]
2011-09-01  7:59                                 ` Dmitry A. Kazakov
2011-08-31 16:08                     ` The simple Image issue (was: Address and bit mask) Adam Beneschan
2011-08-31 16:53                       ` The simple Image issue Simon Wright
2011-08-31 17:02                         ` Hyman Rosen
2011-08-31 20:33                       ` Georg Bauhaus
2011-08-30 19:37             ` Address and bit mask Martin
2011-08-30 16:32           ` Simon Wright
2011-08-31  7:55             ` Ludovic Brenta
2011-08-30 12:35       ` Georg Bauhaus
2011-08-30 13:03       ` Georg Bauhaus
2011-08-30 15:14       ` Adam Beneschan
2011-08-30 15:59         ` Adam Beneschan
2011-08-31  7:45         ` milouz
2011-08-31  8:35           ` Ludovic Brenta
replies disabled

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