comp.lang.ada
 help / color / mirror / Atom feed
From: John Volan <johnv@ac3i.dseg.ti.com>
Subject: Re: Mutually dependent private types
Date: 1998/05/29
Date: 1998-05-29T00:00:00+00:00	[thread overview]
Message-ID: <356F4A5C.218AD59F@ac3i.dseg.ti.com> (raw)
In-Reply-To: Pine.BSF.3.96.980529151526.3076A-100000@shell5.ba.best.com


Brian Rogoff wrote:
> 
> I agree on all points, but I think that your strongest argument against
> using inheritance for resolving forward type declarations is that they
> use up a valuable "line of inheritance" and that the inheritance
> collision problem forces reorganization of packages. I think that with
> better MI the withing problem could have a (only slightly inelegant)
> workaround, *and* there would be a bit more convenience in Ada OOP. The
> "withing problem" solutions you describe are only solutions to the withing
> problem and nothing else. There might be more bang for the language change
> buck in an MI extension.

MI is a separate issue.  If someone could find a reasonable approach to
MI in Ada that resolved all the complexities without doing serious
damage to the rest of the language, then fine, I'm sure many people
would find many useful ways to exploit it.  (I'd encourage anybody
researching this to take a good long look at Java's approach to this.)  

But I'd still see inheritance as the wrong solution for the withing
problem. It would still be an inelegant workaround (and I wouldn't
qualify it as "slightly" inelegant).  If I have two types that are
mutually dependent, a true solution would leave me with just two types
to deal with.  Any "solution" that forces me to deal with four types and
do conversions back and forth is an inelegant workaround.  (And I
include my own generic Forward package in that reckoning: It forces you
to add two opaque Reference_Types and use the conversions in the
Binding.)

Maybe the withing problem is just one problem, but it deserves a
solution nevertheless.

-- 
Signature volanSignature = 
  new Signature
  ( /*name:      */ "John G. Volan",
    /*employer:  */ "Raytheon Advanced C3I Systems, San Jose",
    /*workEmail: */ "johnv@ac3i.dseg.ti.com",
    /*homeEmail: */ "johnvolan@sprintmail.com",
    /*selfPlug:  */ "Sun Certified Java Programmer",
    /*twoCents:  */ "Java would be even cooler with Ada95's " +
                    "generics, enumerated types, function types, " +
                    "named parameter passing, etc...",
    /*disclaimer:*/ "These views not packaged in COM.ti.dseg.ac3i, " +
                    "so loading them throws DontQuoteMeError. :-)" );




  reply	other threads:[~1998-05-29  0:00 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-21  0:00 Mutually dependent private types adam
1998-05-21  0:00 ` John Volan
1998-05-21  0:00 ` Matthew Heaney
1998-05-22  0:00   ` John Volan
1998-05-22  0:00     ` Matthew Heaney
1998-05-26  0:00       ` Robert I. Eachus
1998-05-26  0:00         ` John Volan
1998-05-27  0:00           ` Robert I. Eachus
1998-05-29  0:00             ` John Volan
1998-05-27  0:00           ` Jerry van Dijk
1998-05-29  0:00             ` John Volan
1998-05-26  0:00       ` John Volan
1998-05-26  0:00         ` Matthew Heaney
1998-05-27  0:00           ` John Volan
1998-05-27  0:00             ` Matthew Heaney
1998-05-28  0:00               ` John Volan
1998-05-28  0:00                 ` Matthew Heaney
1998-05-29  0:00                   ` John Volan
1998-05-29  0:00                 ` Brian Rogoff
1998-05-29  0:00                   ` John Volan
1998-05-29  0:00                     ` Brian Rogoff
1998-05-29  0:00                       ` John Volan [this message]
1998-05-30  0:00                 ` Geoff Bull
1998-05-30  0:00                   ` Fergus Henderson
1998-06-01  0:00                     ` John Volan
1998-06-02  0:00                       ` Fergus Henderson
1998-06-04  0:00                       ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1998-05-22  0:00 adam
1998-05-22  0:00 ` John Volan
1998-05-22  0:00 ` Matthew Heaney
1998-05-22  0:00 ` Brian Rogoff
replies disabled

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