From: "andrew.carroll@okstate.edu" <andrew.carroll@okstate.edu>
Subject: Re: Generic Package
Date: 26 Apr 2007 12:40:00 -0700
Date: 2007-04-26T12:40:00-07:00 [thread overview]
Message-ID: <1177616400.352571.308890@o40g2000prh.googlegroups.com> (raw)
In-Reply-To: <1177603644.24583.15.camel@localhost.localdomain>
On Apr 26, 11:07 am, Georg Bauhaus <bauh...@futureapps.de> wrote:
> On Thu, 2007-04-26 at 08:31 -0700, andrew.carr...@okstate.edu wrote:
> > I discovered a possble design mistake in the program I wrote for my
> > Master's course this semester. It's working and all that but I think
> > I could have saved myself many hours of work had I recognized (and
> > regurgitated from my undergraduate knowledge in 2002) the "is a"
> > concept. With respect to databases a tuple "is a" collection of
> > attributes and a table "is a" collection of tuples and a schema "is a"
> > collection of tables. I could have used a generic "collection" to
> > satisfy tuple, table and schema and I wouldn't have had to write code
> > to iterate, add, delete, etcetera from them.
>
> > Does that help explain it?
>
> Are you certain that these high level "is a" relations aren't
> entirely artificial? What is gained by finding a thin, common
> interface of tuples, tables, and schemata?
>
> In the case you describe, I'd prefer composition over
> inheritance. A table has many tuples, and a table is part
> of a schema. So that alone makes tables collections of tuples,
> for example.
>
> By analogy, every type of a program identifies a collection of
> values. But not every type in a program must be explicitly derived
> from some universal ancestor, even when we could find some remote
> property that it shares with all other types. There is value in
> differentiating objects.
>
> Universal unification of everything leads to answers
> as useful as 42. :)
Who said anything about derivation? Yeah, I used the word "is a" but
that doesn't mean I want to build a whole class tree. As far as I am
thinking I just do something like: package Tuple is new
Generic_Collection(Item => attribute);
Attribute can implement some kind of file_system interface and can
iterate by positive count values which are sequential.
Then I could do package Table is new Generic_Collection(Item =>
tuple.???);
Then I could do package Schema is new Generic_Collection(Item =>
table.???);
This is all in a dream world so please don't get to picky with the
syntax. So, is there a "Generic_Collection" type of package in Ada?
next prev parent reply other threads:[~2007-04-26 19:40 UTC|newest]
Thread overview: 84+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-25 22:15 Generic Package andrew.carroll
2007-04-26 0:07 ` Jeffrey R. Carter
2007-04-26 7:46 ` Markus E Leypold
2007-04-26 6:02 ` Martin Krischik
2007-04-26 7:57 ` Dmitry A. Kazakov
2007-04-26 15:31 ` andrew.carroll
2007-04-26 16:07 ` Georg Bauhaus
2007-04-26 19:40 ` andrew.carroll [this message]
2007-04-26 20:01 ` Georg Bauhaus
2007-04-26 18:54 ` Dmitry A. Kazakov
2007-04-26 21:52 ` Simon Wright
2007-04-27 9:00 ` Dmitry A. Kazakov
2007-04-27 11:11 ` Georg Bauhaus
2007-04-27 12:06 ` Dmitry A. Kazakov
2007-04-27 12:52 ` Markus E Leypold
2007-04-27 14:10 ` Georg Bauhaus
2007-04-27 14:16 ` Dmitry A. Kazakov
2007-04-27 21:44 ` Georg Bauhaus
2007-04-28 7:38 ` Dmitry A. Kazakov
2007-04-28 17:50 ` Simon Wright
2007-04-28 21:04 ` Ray Blaak
2007-04-29 16:33 ` Markus E Leypold
2007-04-27 19:44 ` Simon Wright
2007-04-27 20:34 ` Dmitry A. Kazakov
2007-04-27 21:16 ` Simon Wright
2007-04-28 7:36 ` Dmitry A. Kazakov
2007-04-27 11:43 ` Markus E Leypold
2007-04-28 17:35 ` Dmitry A. Kazakov
2007-04-28 23:06 ` Georg Bauhaus
2007-04-29 8:19 ` Dmitry A. Kazakov
2007-04-29 15:10 ` (see below)
2007-04-29 17:48 ` Dmitry A. Kazakov
2007-04-29 22:36 ` (see below)
2007-04-30 6:58 ` Dmitry A. Kazakov
2007-04-30 9:59 ` Markus E Leypold
2007-04-30 10:01 ` Markus E Leypold
2007-04-30 10:36 ` Georg Bauhaus
2007-04-30 10:40 ` Georg Bauhaus
2007-04-30 12:14 ` Dmitry A. Kazakov
2007-04-30 14:57 ` (see below)
2007-04-30 10:30 ` Georg Bauhaus
2007-04-30 12:16 ` Dmitry A. Kazakov
2007-04-30 14:48 ` Georg Bauhaus
2007-04-30 16:29 ` Dmitry A. Kazakov
2007-04-30 17:24 ` Georg Bauhaus
2007-04-30 18:54 ` Dmitry A. Kazakov
2007-04-30 19:29 ` Simon Wright
2007-04-30 20:04 ` Dmitry A. Kazakov
2007-05-01 0:11 ` Markus E Leypold
2007-05-01 9:02 ` Georg Bauhaus
2007-05-01 10:19 ` Dmitry A. Kazakov
2007-05-01 13:42 ` Georg Bauhaus
2007-05-01 17:16 ` Dmitry A. Kazakov
2007-05-01 19:14 ` Randy Brukardt
2007-05-01 20:14 ` Dmitry A. Kazakov
2007-05-02 7:52 ` Markus E Leypold
2007-05-02 8:06 ` Markus E Leypold
2007-05-03 0:37 ` Randy Brukardt
2007-05-03 8:36 ` Markus E Leypold
2007-05-03 23:16 ` Randy Brukardt
2007-05-04 0:15 ` Markus E Leypold
2007-05-01 21:41 ` Georg Bauhaus
2007-05-02 6:57 ` Ray Blaak
2007-05-02 8:22 ` Markus E Leypold
2007-05-02 8:07 ` Markus E Leypold
2007-05-02 10:29 ` Dmitry A. Kazakov
2007-05-02 11:48 ` Georg Bauhaus
2007-05-02 11:50 ` Georg Bauhaus
2007-05-02 13:12 ` Dmitry A. Kazakov
2007-05-02 14:21 ` Markus E Leypold
2007-05-03 18:27 ` Georg Bauhaus
2007-05-03 19:07 ` Dmitry A. Kazakov
2007-05-03 19:49 ` Markus E Leypold
2007-04-29 16:26 ` Markus E Leypold
2007-04-26 21:50 ` Simon Wright
2007-04-27 4:45 ` Jeffrey R. Carter
2007-04-27 7:45 ` Martin Krischik
2007-04-27 22:54 ` Georg Bauhaus
2007-04-30 20:13 ` Matthew Heaney
2007-04-26 20:48 ` andrew.carroll
-- strict thread matches above, loose matches on Subject: below --
2003-12-02 23:15 Mr. J.
2003-12-03 9:31 ` Dmitry A. Kazakov
2003-12-02 23:13 generic package Ratson Janiv
2003-12-03 17:39 ` Stephen Leake
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox