From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,5b031d156719dbc9 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post02.iad.highwinds-media.com!news.flashnewsgroups.com-b7.4zTQh5tI3A!not-for-mail Newsgroups: comp.lang.ada Subject: Re: 'Image for composite types References: From: Stephen Leake Date: Sun, 31 May 2009 08:17:52 -0400 Message-ID: <87d49pihzj.fsf@debian.debian.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:N7d+3sj9zeYBsKLXayP8I/4iM8U= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@flashnewsgroups.com Organization: FlashNewsgroups.com X-Trace: 18e8c4a227572e9cadf9d00389 Xref: g2news2.google.com comp.lang.ada:6134 Date: 2009-05-31T08:17:52-04:00 List-Id: Martin writes: > Is it just me that gets fed up with the lack of 'Image on composite > types? > > I'm thinking in particular of when I'm testing / debugging and usually > end up writing lots of 'Put_Line' code for each and every record. And > then having to maintain them. That's what Auto_Text_IO is for http://www.stephe-leake.org/ada/auto_text_io.html > It got me thinking that the language could be expanded to include some > helper attributes for easily composing a function that could return a > String a la 'Image for scalar types. I should think the compiler could just compose 'Image for each component. That won't work for access types, or task types (and probably others); there would have to be a way to provide user functions for those; a defineable 'Image attribute would be good, as you propose. -- -- Stephe