comp.lang.ada
 help / color / mirror / Atom feed
From: Michael Erdmann <Michael.Erdmann@snafu.de>
Subject: Re: Usage of Interfaces with Ada 95
Date: Sun, 28 Sep 2003 17:09:38 +0200
Date: 2003-09-28T17:09:38+02:00	[thread overview]
Message-ID: <j6aj41-7tj.ln1@boavista.snafu.de> (raw)
In-Reply-To: u1xu1htgl.fsf@earthlink.net

Matthew Heaney wrote:

> Michael Erdmann <Michael.Erdmann@snafu.de> writes:
> 
>> This is not the point! The point is, that i like to setup a
>> repository of concepts, which is specialized when it is used.
>> For example, the iterator (or enumerator) is a very general
>> concept which requieres basicaly the following methods
>> 
>>     First          - Return the first element
>>     Next           - Fetch the next element
>>     HasMoreElement - Check if there is more
>> 
>> 
>> By introducing a set of concepts i like to standarize the coding.
> 
> Again, your use of the term "concept" is unfortunate, because that
> already has a specific meaning, which is that it is something *not* in
> code.
I am not sure, but may be a better term would be pattern? Any way what
is your understanding of a concept?

> Code may reify a concept, but a concept by itself it not code.  If you
> want to standardize the coding, then do so!  But that is completely
> orthogonal to the idea of a concept.

Why are these thing orthogonal? I think a resonable large set of 
patterns (including interface) will keep most of the developers to 
develope there own world of interfaces (e.g. for iterators etc). Reusing 
the development patterns, which are resembled by interfaces, will 
also reduce the complexity of code by standarization the used interfaces,
which on the other hands will make it easier to learn how to use
a piece of code.

Again the iterator is nice example. For example if you take a group
of developers you will find an agreement that something like an iterator
is nessecary. But if you let them build there code independently, you
will find that all are using iterators on various but with slightly 
different interfaces. I my example i like to provide a package enumerator
where the developer X can put in his data type, but the gerneric package
forces him to implement the interface for his data type and nothing 
else. If the semantic of this interface is simple, it will be mutch 
easier for somebody else to maintain the code written on this concept.

>
> For example, all the containers and iterators in the Charles library
> reify your iterator concept above.  So what's the problem?  That library
> does exactly what you want, which is to iterate over the elements in a
> container.

This is true, actually i am not so mutch interested in containers etc, they
are simple a test object for my idea.

> Charles, the STL, and the Ada predefined I/O packages are all designed
> using static polymorphism. You seem to want to use dynamic
> polymorphism.  Why?  If static polymorophism does the job, what are you
> complaining about?
This is a good question. May be i need to rethink my position on this,
since the idea arises from my Java experience.

Regards
   M.Erdmann








  reply	other threads:[~2003-09-28 15:09 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-26 16:36 Usage of Interfaces with Ada 95 Michael Erdmann
2003-09-26 16:50 ` chris
2003-09-26 16:55 ` Hyman Rosen
2003-09-26 19:10   ` Michael Erdmann
2003-09-26 20:37     ` Hyman Rosen
2003-09-27 15:05       ` Michael Erdmann
2003-09-28  2:11         ` Matthew Heaney
2003-09-29  2:25         ` George Shapovalov
2003-09-28  2:14   ` Matthew Heaney
2003-09-28  8:28     ` Michael Erdmann
2003-09-28 14:33       ` Matthew Heaney
2003-09-28 15:09         ` Michael Erdmann [this message]
2003-09-28 21:50           ` Matthew Heaney
2003-09-30  4:57             ` Michael Erdmann
2003-09-30 10:02               ` Mário Amado Alves
2003-09-30 12:31               ` Matthew Heaney
2003-09-30 19:58                 ` Michael Erdmann
2003-09-28 17:10         ` Simon Wright
2003-09-28 21:52           ` Matthew Heaney
2003-09-28 21:58           ` Matthew Heaney
2003-09-29 19:37             ` Georg Bauhaus
2003-09-29 19:45               ` Georg Bauhaus
2003-09-30  7:10               ` Preben Randhol
2003-09-29 20:11             ` Simon Wright
2003-09-29 22:56               ` Matthew Heaney
2003-09-30 14:53                 ` Matthew Heaney
2003-09-30 16:13                   ` Preben Randhol
2003-09-29 13:49           ` Matthew Heaney
2003-09-28 18:22       ` Robert I. Eachus
2003-09-29  3:02         ` Hyman Rosen
2003-09-30  3:11           ` Robert I. Eachus
2003-09-30 13:38             ` Hyman Rosen
2003-09-30 21:46               ` Robert I. Eachus
2003-09-30 22:10                 ` Hyman Rosen
2003-10-01  2:30                   ` Robert I. Eachus
2003-10-01  2:41                   ` Robert I. Eachus
2003-10-01 13:21                     ` Hyman Rosen
2003-10-01 17:01                       ` Robert I. Eachus
2003-10-01 18:46                       ` Matthew Heaney
2003-09-29 14:52       ` Stephen Leake
2003-09-29 23:00         ` Matthew Heaney
2003-09-30 12:49           ` Marin David Condic
2003-09-30 23:48             ` Matthew Heaney
replies disabled

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