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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no 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!news3.google.com!feeder.news-service.com!newsfeed.freenet.de!news.tu-darmstadt.de!news.belwue.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: 'Image for composite types Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Thu, 28 May 2009 11:13:27 +0200 Message-ID: NNTP-Posting-Date: 28 May 2009 11:13:11 CEST NNTP-Posting-Host: 85161cc2.newsspool1.arcor-online.net X-Trace: DXC=WC355V9j[PcfF8a^:6>b7eic==]BZ:afn4Fo<]lROoRa^YC2XCjHcbikSWNOGakgbhH0FAg72hkh X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:6057 Date: 2009-05-28T11:13:11+02:00 List-Id: On Wed, 27 May 2009 15:20:56 -0700 (PDT), Martin wrote: > Is it just me that gets fed up with the lack of 'Image on composite > types? That 'Image is not a primitive operation is even worse. > 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. > > function record_type_definition'Component_Name (I : Positive) > return String; > function record_type_definition'Component_Image (I : Positive) > return String; > function record_type_definition'Number_Of_Components return > Natural; This is the interface of a container type. A right solution should make all records inherit from an abstract ordered mapping, so these primitive operations will be for free. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de