comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@shell5.ba.best.com>
Subject: Re: User define attributes
Date: Mon, 16 Apr 2001 15:37:03 GMT
Date: 2001-04-16T15:37:03+00:00	[thread overview]
Message-ID: <Pine.BSF.4.21.0104160829570.11661-100000@shell5.ba.best.com> (raw)
In-Reply-To: <3adb0ba1$1@pull.gecm.com>

On Mon, 16 Apr 2001, Martin Dowie wrote:
> been there; done that; got the compiler listing... :-)

:-)

> I suspect there are many companies out there with very
> similar generics.
> 
> I suppose we have to ask the question - if it is that
> easy (and relative to the actual application, it
> usually is!) then why isn't 'Image for composite types
> part of the language?..

Given the desire to make array and function call syntax identical, I
wonder why there is even an attribute syntax at all, rather than just 
having function call syntax and system defined functions. I'd much rather 
just write Image(X) everywhere (but write A[I] for array access :). 

-- Brian
 
> Samuel T. Harris <u61783@gsde.hou.us.ray.com> wrote in message
> news:3ADB033A.F10344A9@gsde.hou.us.ray.com...
> > It is trivial to build a generic which implements the a
> > width, value, and image function for arrays. All it needs
> > are the width, value, and image functions for the indexes
> > and composite types.
> >
> > It is somewhat harder to build a generic for records
> > since the "index" are the field names and the composite
> > function depend upon which field is in use. But it
> > can be done.
> >
> > I routinely write width, value, and image functions
> > for all my important types. Having these generics
> > in place, I get these routines with some simple
> > handler code and a generic instantiations. With them
> > I get the following advantages ...
> >
> > 1. I can easily insert put_line kinds of debug code.
> > 2. If supported, I can call them within my debugger.
> > 3. I can defer aggregrate initialization of variables
> >    to file_io during elaboration, and vice-versa.
> 
> 
> 
> 




  reply	other threads:[~2001-04-16 15:37 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-14 13:33 User define attributes Ayende Rahien
2001-04-16  7:27 ` Martin Dowie
2001-04-16 11:23   ` Ayende Rahien
2001-04-16 11:37     ` Martin Dowie
2001-04-16 14:35       ` Samuel T. Harris
2001-04-16 15:20         ` Martin Dowie
2001-04-16 15:37           ` Brian Rogoff [this message]
2001-04-16 16:19           ` Samuel T. Harris
2001-04-16 17:08             ` Marin David Condic
2001-04-16 22:00               ` Samuel T. Harris
2001-04-17 12:34                 ` Georg Bauhaus
2001-04-17 20:35                   ` Samuel T. Harris
2001-04-24 21:00                   ` Samuel T. Harris
2001-04-16 17:37             ` Martin Dowie
     [not found]           ` <0tEC6.7646$FY5.638172@www.newsranger.com>
2001-04-16 17:34             ` Martin Dowie
2001-04-18 12:14         ` Marius Amado Alves
2001-04-18 20:50           ` Samuel T. Harris
2001-04-19  1:35             ` Jeffrey Carter
2001-04-19 12:50               ` Samuel T. Harris
2001-04-20 19:08             ` Marius Amado Alves
replies disabled

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