comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: 'Image for composite types
Date: Thu, 28 May 2009 11:13:27 +0200
Date: 2009-05-28T11:13:11+02:00	[thread overview]
Message-ID: <kipulhhii1gb$.kjnwixlx5doz.dlg@40tude.net> (raw)
In-Reply-To: f241da28-497c-450a-a804-829eaa1f7608@l28g2000vba.googlegroups.com

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



  parent reply	other threads:[~2009-05-28  9:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-27 22:20 'Image for composite types Martin
2009-05-27 23:23 ` Robert A Duff
2009-05-27 23:44 ` Adam Beneschan
2009-05-28  6:46   ` Martin
2009-05-28  9:53   ` Georg Bauhaus
2009-05-28 10:42     ` Martin
2009-05-28 11:31       ` Georg Bauhaus
2009-05-28 16:25       ` Jeffrey R. Carter
2009-05-28 16:47         ` Martin
2009-05-28  3:36 ` Per Sandberg
2009-05-28  5:15   ` tmoran
2009-06-06  9:17   ` Martin
2009-05-28  9:13 ` Dmitry A. Kazakov [this message]
2009-05-31 12:17 ` Stephen Leake
2009-06-06  9:17   ` Martin
replies disabled

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