comp.lang.ada
 help / color / mirror / Atom feed
From: matthew_heaney@acm.org (Matthew Heaney)
Subject: Re: Mutually dependent private types
Date: 1998/05/22
Date: 1998-05-22T00:00:00+00:00	[thread overview]
Message-ID: <matthew_heaney-ya023680002205981728180001@news.ni.net> (raw)
In-Reply-To: 6k4b7t$vhn$1@nnrp1.dejanews.com


In article <6k4b7t$vhn$1@nnrp1.dejanews.com>, adam@irvine.com wrote:

>> I read John's paper, but I don't find his argument convincing.  Doesn't the
>> following code solve the putative with'ing "problem"?
>
>I think John's objection to this solution is that it requires a
>runtime check to make sure the second parameter has the correct type.

There are many, many times when a run-time check is required.  For example,

declare
   X : Integer := ...;
begin
   X := X + 1;
end;

requires a run-time check.

>Also, one could object on philosophical grounds that requiring the two
>packages to be children of a common parent isn't appropriate for
>packages that really don't have much of a common purpose.  (Then
>again, I suppose that with every language there are cases that require
>one to write code that goes against software engineering philosophy.)

Perhaps so, but it was the constraints of your particular problem that
necessitated that structure.  Specifically, you required each type to have
knowledge of the representation of the other.  Had your problem been, Can
we have types in different packages that take the other type as an argument
in the spec?, then the answer is yes, and making them children of a common
root would not have been required.




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

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-05-22  0:00 Mutually dependent private types adam
1998-05-22  0:00 ` John Volan
1998-05-22  0:00 ` Brian Rogoff
1998-05-22  0:00 ` Matthew Heaney [this message]
  -- strict thread matches above, loose matches on Subject: below --
1998-05-21  0:00 adam
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
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
1998-05-21  0:00 ` John Volan
replies disabled

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