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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Record operations (Algebraic Data Types and printing) Date: Fri, 5 Oct 2018 21:46:38 +0300 Organization: Tidorum Ltd Message-ID: References: <0f5608ef-0038-491c-b15f-f67bcc76fae8@googlegroups.com> <00285ebf-6ede-44da-848f-456930dc7475@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net j1dCdKm/iWb/VUakhFT8vg596wZkEXm1H1Bt/bhNrKSmPmPkV3 Cancel-Lock: sha1:jkA+AYR2POEzT6qnaOt8dtVBN8Q= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Xref: reader02.eternal-september.org comp.lang.ada:54492 Date: 2018-10-05T21:46:38+03:00 List-Id: On 18-10-05 21:11 , Henrik Härkönen wrote: > On Friday, 5 October 2018 20:58:30 UTC+3, AdaMagica wrote: >> Do it yourself... There is no such default. > > Yes, I was coming to this conclusion quite quickly as well. Thought > to ask, just in case. :) I suppose most Ada programmers have at some time wished for an 'Image attribute for records. And arrays. > ... As stated above, coming from > Scala (and JVM) world, and having worked also with Python for years, > Ada seems to be _quite_ a different world (to me at least). Ada has essentially no means for run-time reflection, such as programmatic access to the type structure of the running program. The ASIS library provides off-line (post-compilation) access to such information, and could be used to create source code for Image functions for the record types, which could then be added to a recompilation of the original program. > I do have professional C background as well, but that's so low level > stuff that I wouldn't expect anything fancy like that... Regarding reflection it seems to me that C and Ada are equally null. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .