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 Path: g2news2.google.com!postnews.google.com!f16g2000vbf.googlegroups.com!not-for-mail From: Martin Newsgroups: comp.lang.ada Subject: Re: 'Image for composite types Date: Sat, 6 Jun 2009 02:17:10 -0700 (PDT) Organization: http://groups.google.com Message-ID: <4e1ceddf-9272-42ad-9e8c-4d62fdc81553@f16g2000vbf.googlegroups.com> References: <87d49pihzj.fsf@debian.debian.org> NNTP-Posting-Host: 86.148.100.105 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1244279830 18810 127.0.0.1 (6 Jun 2009 09:17:10 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 6 Jun 2009 09:17:10 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f16g2000vbf.googlegroups.com; posting-host=86.148.100.105; posting-account=g4n69woAAACHKbpceNrvOhHWViIbdQ9G User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.10) Gecko/2009042315 Firefox/3.0.10, Ant.com Toolbar 1.3,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:6325 Date: 2009-06-06T02:17:10-07:00 List-Id: On May 31, 1:17=A0pm, Stephen Leake wrote: > 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 forhttp://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 Thanks for the link - just wish it was part of the language, make life even easier. Cheers -- Martin