comp.lang.ada
 help / color / mirror / Atom feed
From: robert_dewar@my-dejanews.com
Subject: Re: with'ing a "foreign" package or subsystem
Date: 1999/03/01
Date: 1999-03-01T00:00:00+00:00	[thread overview]
Message-ID: <7be4aj$cqf$1@nnrp1.dejanews.com> (raw)
In-Reply-To: m3g17qcc3u.fsf@mheaney.ni.net

In article <m3g17qcc3u.fsf@mheaney.ni.net>,
  Matthew Heaney <matthew_heaney@acm.org> wrote:
> Suppose my company and another company are collaborating
> on building a large software system written in Ada.  We
> each go off and separately build the subsystems we're
> responsible for, and then come together some
> time later for system integration.
>
> During development, I needed a stack, and I implemented
> the following package:
>
> generic
>   type Item_Type is private;
> package Stacks is ...;
>
> and my company has been using it for a while.
>
> But come integration time, the other company (call them
> ACME) had also written package Stacks, but with a
> different interface, and they're
> using their version of Stacks everywhere.
>
> Can both packages coexist in the same application?

No!

And the trouble you are in reflects a fundamental mistake
in how you proceeded. If you are sharing a global name
space with someone, you MUST negotiate how this name
space will be used in advance, or of course you will
get into a mess.

In the case of Ada 95, it is *easy* to avoid such a mess.
It is clear that package Stacks in both cases should have
been a child package, since it was not part of the agreed
global spec between you. You should each have agreed to
a global top level utility package name, and put all your
stuff under that name.

As an example, when you use GNAT, providing you have not
used the package name GNAT, then you can use all the GNAT
provided special packages with no worry about name
conflicts.

I would be strongly opposed to implementing the kind of
kludge solution to this mess that you propose. The proper
way to fix a mess is to clean it up!

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




      parent reply	other threads:[~1999-03-01  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-28  0:00 with'ing a "foreign" package or subsystem Matthew Heaney
1999-02-28  0:00 ` nabbasi
1999-03-01  0:00   ` Nick Roberts
1999-03-01  0:00     ` Ehud Lamm
1999-03-01  0:00   ` dennison
1999-03-01  0:00 ` Samuel Mize
1999-03-02  0:00   ` dennison
1999-03-01  0:00 ` dennison
1999-03-01  0:00 ` dennison
1999-03-01  0:00 ` robert_dewar [this message]
replies disabled

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