comp.lang.ada
 help / color / mirror / Atom feed
From: mheaney@ni.net (Matthew Heaney)
Subject: Re: Mixing Ada and C++. Is a good idea?
Date: 1997/11/15
Date: 1997-11-15T00:00:00+00:00	[thread overview]
Message-ID: <mheaney-ya023680001511971659520001@news.ni.net> (raw)
In-Reply-To: gwinn-1111972003010001@dh5055060.res.ray.com


In article <gwinn-1111972003010001@dh5055060.res.ray.com>,
gwinn@res.ray.com (Joe Gwinn) wrote:

>Beware variant records in OO.  Ada83 variant records have the well-known
>property that if anything in any record in the variant set changes,
>everybody who uses any member of that set must recompile.  In practice, in
>a project of any size, this means one recompiles the world just about
>every day.  

If you're recompiling the world every day, then something is wrong with the
design of the application, not with the language.

This phenomenon often occurs when a "common types" package is being used,
that contains a lot of low-cohesion type declarations that everyone with's. 
Add another type, and everyone who touches that package needs to be
recompiled.  You need to break the single, large, low-cohesion package up
into several smaller packages, that each contains a set a high-cohesion
types.  That way, when you add another type, only that corner of the
application that depends on that specific package needs to be recompiled.

If you're doing a message passaging (perhaps the common types package
declares a variant record containing all message types), then use the
streams facility, so a package only depends on the predefined streams
packages.  You might even consider deriving message types from a
Root_Message tagged type, so that message tags will be determined by the
compiler.  Better still is to use the distributed systems annex.

--------------------------------------------------------------------
Matthew Heaney
Software Development Consultant
<mailto:matthew_heaney@acm.org>
(818) 985-1271




  parent reply	other threads:[~1997-11-15  0:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-11-04  0:00 Mixing Ada and C++. Is a good idea? Arantza Diaz de Ilarraza
1997-11-11  0:00 ` Joe Gwinn
1997-11-12  0:00   ` Robert Dewar
1997-11-14  0:00   ` Ed Falis
1997-11-14  0:00     ` Joe Gwinn
1997-11-14  0:00       ` Robert Dewar
1997-11-20  0:00         ` Joe Gwinn
1997-11-14  0:00       ` Robert Dewar
1997-11-15  0:00   ` Matthew Heaney [this message]
1997-11-20  0:00     ` Joe Gwinn
1997-11-21  0:00       ` Robert Dewar
1997-11-21  0:00         ` Matthew Heaney
  -- strict thread matches above, loose matches on Subject: below --
1997-11-20  0:00 Robert Dewar
1997-11-21  0:00 ` Larry Kilgallen
1997-11-21  0:00   ` Robert Dewar
1997-11-24  0:00 ` Anonymous
replies disabled

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