comp.lang.ada
 help / color / mirror / Atom feed
From: jsa@organon.com (Jon S Anthony)
Subject: So called Real OO (was blah blah blah...)
Date: 1996/02/26
Date: 1996-02-26T00:00:00+00:00	[thread overview]
Message-ID: <JSA.96Feb25194841@organon.com> (raw)
In-Reply-To: Dn5qGH.9xH@assip.csasyd.oz

In article <Dn9BzB.IMA@world.std.com> bobduff@world.std.com (Robert A Duff) writes:

> You seemed to object strongly to the idea that one can put two types in
> the same package, on the grounds that it decreases encapsulation.  On
> the contrary, it *increases* encapsulation.  When two types are closely
> related to each other, by their nature, *forcing* them to be in separate
> modules means that *more* operations need to be exported from each
> module.

Yes, but in this context (Eiffel) it is mostly irrelevant.  This is
because the two classes can export the "detail stuff" to each other
_only_.  This is from selective export, in particular the optional
part of a feature clause (listing its client classes).  See ETL 7.12
and 7.13.

> mentioned above, about putting list-cursor information inside the list
> itself?  If you have multiple tasks, you definitely want to have two
> tasks iterating through the same shared list (or whatever data
> structure).  Has the standard class library been changed to solve this
> problem?

I think you are confused here.  Iteration is effected by inheriting
from say, list_iteration, when defining some class that needs to be
"iterated over".  In effect, list_iteration supplies only the pattern,
so the particular class has the "cursor" (which is not accessible in
any event).  To handle more than one iteration, you repeatedly inherit
list_iteration (renaming bits as appropriate).  Now, the real problem
here (as has been discussed to death on c.l.e) is that the repeated
inheritance machinery exists in the main to support this iteration
aspect and it is rather complicated and subtle machinery to handle
such a simple thing.  In some respects this bit is the Eiffel
counterpart "dirty laudry" to the "mutual withing" problem in Ada:
Yes, you can get the thing to work, but it isn't pretty.

/Jon
-- 
Jon Anthony
Organon Motives, Inc.
1 Williston Road, Suite 4
Belmont, MA 02178

617.484.3383
jsa@organon.com





  parent reply	other threads:[~1996-02-26  0:00 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <DMqHqF.9F1.0.-s@inmet.camb.inmet.com>
     [not found] ` <DMu9yw.5ts@assip.csasyd.oz>
     [not found]   ` <4g2f8v$15lc@watnews1.watson.ibm.com>
1996-02-19  0:00     ` Choice of OO primitives in Ada95 Don Harrison
1996-02-19  0:00       ` Robert A Duff
1996-02-20  0:00         ` Don Harrison
1996-02-20  0:00           ` Ray Toal
1996-02-21  0:00             ` Don Harrison
1996-02-23  0:00               ` Robert A Duff
1996-02-22  0:00             ` Bernd Holzmueller
1996-02-23  0:00               ` Robert A Duff
1996-02-20  0:00           ` Jon S Anthony
1996-02-22  0:00             ` Real OO (was Choice of OO primitives in Ada95) Don Harrison
1996-02-22  0:00               ` Jon S Anthony
1996-02-22  0:00               ` Robert Dewar
1996-02-23  0:00                 ` Gene Ouye
1996-02-26  0:00                   ` James O'Connor
1996-02-26  0:00                     ` Gene Ouye
1996-02-24  0:00               ` Robert A Duff
1996-02-26  0:00                 ` Don Harrison
1996-02-26  0:00                 ` Matthew B. Kennel
1996-02-24  0:00               ` Valery Croizier
1996-02-26  0:00               ` Jon S Anthony [this message]
1996-02-23  0:00           ` Choice of OO primitives in Ada95 Robert A Duff
1996-02-19  0:00       ` Norman H. Cohen
1996-02-21  0:00       ` Robert I. Eachus
1996-02-21  0:00     ` John DiCamillo
1996-02-22  0:00       ` Don Harrison
1996-02-24  0:00         ` Robert A Duff
replies disabled

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