comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.tsoh+bauhaus@maps.futureapps.de>
Subject: Re: Generic Collection
Date: Wed, 09 May 2007 18:12:12 +0200
Date: 2007-05-09T18:12:00+02:00	[thread overview]
Message-ID: <1178727131.9164.38.camel@kartoffel> (raw)
In-Reply-To: <1178722277.733981.6200@l77g2000hsb.googlegroups.com>

On Wed, 2007-05-09 at 07:51 -0700, andrew wrote:
> Actually I take that back.  RDB2 looks promising with respect to how I
> have my program now.  What I want is to be able to change my program
> so that I can declare table, tuple and schema to be of a "collection"
> type like:
> 
> table: collection;
> tuple: collection;
> schema: collection;

The question now becomes, do you want table, tuple, and schema
to have the same behavior? Then you could use instances of the
same generic collection package, or interface types, or mimick
duck types... Do you want table, tuple, and schema to be
interchangeable parameters for some "common" subprograms (other
than Add)?

Are there cases where you want your program to decide which
kind of collection it is reading?

> This again would depend on being able to use a common object like Java
> has.

Interestingly, Java has recently got generics. In part, because
this circumvents the consequences of everything being an Object.

> What do you think?

42 if your intent is to blur the distinction between tuple,
table, and schema to the extent that all have just one common
type; a reader of you program might then have to inspect quite
a bit of context to find out what is meant if something goes
wrong. If this is the case, can you show that the similarities
implied by Add and such should preclude any explicit distinction
between tuple, table, and schema?  OTOH, if they are Ada.Containers
all of them will have a similar interface, even though this fact
isn't reflected in an interface type.







  reply	other threads:[~2007-05-09 16:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-08 19:29 Generic Collection andrew
2007-05-08 21:00 ` Georg Bauhaus
2007-05-08 21:59   ` andrew
2007-05-09 14:51     ` andrew
2007-05-09 16:12       ` Georg Bauhaus [this message]
2007-05-09 18:54         ` andrew
2007-05-10 19:31           ` Simon Wright
2007-05-10 22:48             ` andrew
2007-05-11  8:10               ` Georg Bauhaus
2007-05-11 20:41                 ` andrew
2007-05-11 21:28                   ` Georg Bauhaus
2007-05-11 21:55                     ` andrew
2007-05-12  7:18               ` Simon Wright
2007-05-12  7:52                 ` Dmitry A. Kazakov
2007-05-13 11:00                   ` Simon Wright
2007-05-13 12:11                     ` Dmitry A. Kazakov
2007-05-16  0:27                     ` Randy Brukardt
2007-05-16  6:05                       ` Simon Wright
2007-05-16  7:17                         ` Untagged types don't work right - was: " Grein, Christoph (Fa. ESG)
2007-05-16 13:27                       ` Benjamin Place
2007-05-14 17:09                 ` andrew
2007-05-14 20:00                   ` Simon Wright
replies disabled

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