comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: SOLVED! Decoupled Mutual Recursion Challenger
Date: 2 Nov 94 14:56:02
Date: 1994-11-02T14:56:02+00:00	[thread overview]
Message-ID: <EACHUS.94Nov2145602@spectre.mitre.org> (raw)
In-Reply-To: jmartin@oahu.cs.ucla.edu's message of 28 Oct 1994 11:46:43 -0700

In article <38rguj$9cd@oahu.cs.ucla.edu> jmartin@oahu.cs.ucla.edu (Jay Martin) writes:

  > Could you give an example of how you could shoot yourself in the foot
  > using the package forward idea.  How do you implement mutual recursion
  > using straight Ada83 derived types?  The abstract type solution and
  > downcasting are not deemed very exceptable by many of the lang.ada
  > participants.  Jay

    The representations CAN'T be mutually recursive without some
variant records and other tricks.  The package forward idea would
allow such declarations. (There is no easy place to decide that you
have such a loop.)  On the other hand, even in Ada 83 it is possible
to defer the actual declaration of the record object corresponding to
the type to the body of the package.  If you do this, you get pointer
semantics for objects of the type, which may have to be adjusted in
the interface, but--especially if you make the type limited--that is
not a major issue.

    Yes, yes.  If you want to have a primitive operation on Office
which returns a Person and vice-versa, you can do it in one package
spec, or three, or four, but not two.  I still fail to understand the
degree of mouth frothing directed at this "weakness" of Ada.  As we
have seen in the past several weeks, Ada provides lots of different
ways of modeling this system.  That there are some models in other
languages which can be duplicated more easily than others should not
come as a surprise.  Let's focus on the "right" way to do it in Ada
instead.


--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...



  reply	other threads:[~1994-11-02 14:56 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-10-12 22:49 SOLVED! Decoupled Mutual Recursion Challenger John Volan
1994-10-17 15:48 ` John Volan
1994-10-17 17:55   ` Bob Duff
1994-10-17 20:52     ` John Volan
1994-10-17 22:10       ` Bob Duff
1994-10-18 22:17         ` John Volan
1994-10-19  1:01           ` Bob Duff
1994-10-19  4:45             ` Jay Martin
1994-10-19 14:38               ` Mark A Biggar
     [not found]                 ` <38fi4r$l81@oahu.cs.ucla.edu>
1994-10-24 11:49                   ` Mutual Recursion Challenge Robert I. Eachus
1994-10-24 20:32                     ` John Volan
1994-10-26 11:42                       ` Generic association example (was Re: Mutual Recursion Challenge) Robert I. Eachus
1994-10-26 23:21                         ` John Volan
1994-10-27 10:53                           ` Robert I. Eachus
1994-10-31 17:34                             ` John Volan
1994-10-27 14:37                           ` Mark A Biggar
1994-10-24 17:42                   ` SOLVED! Decoupled Mutual Recursion Challenger John Volan
1994-10-24 22:37                     ` Jay Martin
1994-10-25  5:47                       ` Matt Kennel
1994-10-25 10:04                         ` David Emery
1994-10-25 16:43                         ` John Volan
1994-10-27  4:25                           ` Rob Heyes
1994-10-28  9:03                             ` Mutual Recursion (was Re: SOLVED! Decoupled Mutual Recursion Challenger) Robert I. Eachus
1994-10-28 15:04                             ` SOLVED! Decoupled Mutual Recursion Challenger Robb Nebbe
1994-10-25 15:54                       ` John Volan
1994-10-26  1:24                         ` Bob Duff
1994-10-28  4:28                         ` Jay Martin
1994-10-28 10:52                           ` Robert I. Eachus
1994-10-28 18:46                             ` Jay Martin
1994-11-02 14:56                               ` Robert I. Eachus [this message]
1994-10-29  0:38                           ` Bob Duff
1994-10-29  7:26                             ` Jay Martin
1994-10-29 11:59                             ` Richard Kenner
1994-10-31 13:17                               ` Robert Dewar
1994-10-31 14:13                               ` gcc distribution (was: SOLVED! Decoupled Mutual Recursion Challenger) Norman H. Cohen
1994-11-02 14:14                                 ` Richard Kenner
1994-11-04 23:56                                   ` Michael Feldman
1994-10-31 18:44                           ` SOLVED! Decoupled Mutual Recursion Challenger John Volan
1994-10-20 11:25               ` Robb Nebbe
1994-10-20 19:19                 ` John Volan
1994-10-26  0:07                 ` Mark S. Hathaway
1994-10-26 18:48                 ` gamache
1994-10-27  2:15                   ` John Volan
     [not found]           ` <CxwGJF.FwB@ois.com>
1994-10-19 16:35             ` John Volan
1994-10-17 22:54   ` Cyrille Comar
replies disabled

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