comp.lang.ada
 help / color / mirror / Atom feed
From: Vinzent Hoefler <ada.rocks@jlfencey.com>
Subject: Re: Ada 200X
Date: Tue, 03 Jun 2003 11:09:50 +0200
Date: 2003-06-03T11:09:50+02:00	[thread overview]
Message-ID: <bbhonc$9fqqm$1@ID-175126.news.dfncis.de> (raw)
In-Reply-To: 3EDBBC18.6080103@attbi.com

Robert I. Eachus wrote:

>Vinzent Hoefler wrote:
>
>> Because the view conversion to a grandparent is of course allowed,
>> this is little tricky if not to say error prone sometime.
>> 
>> Well, yes, I know, you should always design your object hierarchy
>> beforehand. ;-)
>
>In one sense this is a valid criticism of the "Ada way" of doing things. 
>  In another it is totally bogus.

I was afraid so. ;-)

>Ada tagged type derivation trees tend to come in two flavors. [...]

Mmh, well. I encounter a third variant quite often. For instance let's
take a short look at a part of the good old TurboVision object
hierarchy:

|                         +-------+
|                         ¦TObject¦
|                         +-------+
|                             |
|                          +-----+
|                          ¦TView¦
|                          +-----+
|                             |
|       +----------------------------------------------+
|       |       |        |       |      |      |       |
|  +----------+ |  +----------+  | +--------+  |   +------+
|  |TScrollBar| |  |TInputLine|  | |TCluster|  |   |TGroup|
|  +----------+ |  +----------+  | +--------+  |   +------+
|               |                |     |       |       |
|         +-----------+     +--------+ | +-----------+ +-------------+
|         ¦TStaticText¦     ¦THistory¦ | ¦TListViewer¦               |
|         +-----------+     +--------+ | +-----------+               |
|               |                      |       |                     |
|         +-----------+                |    +-----------+            |
|         |           |                |    |           |            |
|      +------+  +----------+          | +--------+ +--------------+ |
|      |TLabel|  |TParamText|          | |TListBox| |THistoryViewer| |
|      +------+  +----------+          | +--------+ +--------------+ |
|                               +------+--------+           +--------+
|                               |      |        |           |
|                               | +-----------+ |       +-------+
|                               | |TCheckBoxes| |       |TWindow|
|                               | +-----------+ |       +-------+
|                         +-------------+ +----------------+ |
|                         |TRadioButtons| |TMultiCheckBoxes| |
|                         +-------------+ +----------------+ |
|                                                    +-------------+
|                                                    |             |
|                                            +--------------+  +-------+
|                                            |THistoryWindow|  |TDialog|
|                                            +--------------+  +-------+

This rather looks like a tree. And I doubt, any medium sized OO-System
would be much different from that just because it's Ada.

So let's say, as a specific example, I am deriving MyWindow from
TWindow, slightly change one of its method and let the fathers method
do the usual rest. Now I decide to insert another object (of course I
will derive from that later) into the tree, so that TWindow is now the
grandfather of MyWindow. Because I am still calling the method of
TWindow I skip the new inbetween object's method. This might be wrong
or false depending on what it does and what I intended to do. So
having something like "inherited" in Object-Pascal that automagically
selects the right method of either the father, grandfather,
grand-grandfather, ..., in the cases where I *really* just want to use
the method of the anchestor would be nice.

Well, after a night of thought I see some problems with that,
especially that it 1) hides where exactly the method comes from
(depending on the view of information hiding this might be a good or a
bad thing) and 2) a worse case: If the anchestor, whos method I am
about to call, is really declared in another package that I didn't
even "with"ed in.


Vinzent.

-- 
Parents strongly cautioned  --  this  posting  is  intended for mature
audiences  over  18.  It  may  contain some material that many parents
would not find suitable for children and may include intense violence,
sexual situations, coarse language and suggestive dialogue.



  parent reply	other threads:[~2003-06-03  9:09 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-01 21:36 Ada 200X And838N
2003-06-02  2:22 ` Bobby D. Bryant
2003-06-02  4:20 ` Robert I. Eachus
2003-06-02 11:22   ` Larry Kilgallen
2003-06-02 14:09     ` Hyman Rosen
2003-06-02 14:23       ` Vinzent Hoefler
2003-06-02 14:59         ` Hyman Rosen
2003-06-02 15:04           ` Vinzent Hoefler
2003-06-02 15:18             ` Bill Findlay
2003-06-02 15:32               ` Larry Kilgallen
2003-06-02 15:41               ` Vinzent Hoefler
2003-06-02 15:07           ` Larry Kilgallen
2003-06-02 15:04         ` Larry Kilgallen
2003-06-02 14:23     ` Robert I. Eachus
2003-06-02 14:31       ` Vinzent Hoefler
2003-06-02 15:05         ` Larry Kilgallen
2003-06-02 15:06         ` Hyman Rosen
2003-06-02 21:05         ` Robert I. Eachus
2003-06-02 22:59           ` Larry Kilgallen
2003-06-03  4:07             ` Robert I. Eachus
2003-06-03  7:52           ` Jean-Pierre Rosen
2003-06-03  9:09           ` Vinzent Hoefler [this message]
2003-06-03 14:54             ` Robert I. Eachus
2003-06-04  7:38               ` Vinzent Hoefler
2003-06-05  7:20                 ` Robert I. Eachus
2003-06-02  5:36 ` Wesley Groleau
2003-06-02  8:02 ` Preben Randhol
2003-06-02 10:50 ` Georg Bauhaus
2003-06-03  2:29 ` Steve
2003-06-03  2:45 ` Gautier Write-only
2003-06-03  8:38   ` Vinzent Hoefler
2003-06-03 11:48   ` Preben Randhol
2003-06-03 12:14     ` Lutz Donnerhacke
2003-06-03 12:35       ` Preben Randhol
2003-06-07 21:16       ` Craig Carey
2003-06-08 11:14         ` Martin Dowie
2003-06-09 14:07           ` Craig Carey
2003-06-13 14:20             ` Matthew Heaney
2003-06-13 14:00         ` Matthew Heaney
2003-06-03 17:24     ` Robert A Duff
2003-06-03 17:45       ` Preben Randhol
2003-06-03 17:48         ` Preben Randhol
2003-06-03 18:05           ` Vinzent Hoefler
2003-06-04 10:36             ` Preben Randhol
  -- strict thread matches above, loose matches on Subject: below --
2004-10-31  1:51 David Botton
2004-10-31  7:33 ` Martin Dowie
2004-10-31 18:59   ` Jeffrey Carter
2002-12-26 16:17 Ada 200x Adrian Hoe
2002-12-27 19:32 ` Randy Brukardt
2002-12-27 20:55   ` 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