comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Private area and child packages
Date: Thu, 30 Dec 2004 12:51:05 -0600
Date: 2004-12-30T12:51:05-06:00	[thread overview]
Message-ID: <wp6dnZRo_NWE00ncRVn-3A@comcast.com> (raw)
In-Reply-To: 1104333056.340127.5170@f14g2000cwb.googlegroups.com

>What I was wondering was how someone writing Some_Package can enforce
>this on future package writers. I could obviously follow your
>suggestion if I am the only developer writing code for a project. But,
>if I want to hide implementation details from someone else who might
>write a child package, I would need some mechanism to enforce this
>information hiding.
   You could burn the only copy of the source code.  Seriously, how
else could you enforce such a restriction on future developers who
want to fiddle with/fix your code?  Even if the compiler would
allow such a limit (say by disallowing child packages) what would
prevent someone from simply modifying your code, say by moving the
"hidden" declaration from the private to the public part of the spec?
Or, if they can't modify your code, but can find a copy of the source
somewhere, they could declare their own structure to match yours, and
use an address clause to overlay their (visible) structure over yours.
  Part of the Ada Style is a certain humility.  Assuming that your
code and your design is so perfect that any change by anyone in the
future is bad, is unwise, as shown by much sad experience.  IMHO



  reply	other threads:[~2004-12-30 18:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-29  4:05 Private area and child packages danmcleran
2004-12-29  4:47 ` tmoran
2004-12-29 15:10   ` danmcleran
2004-12-30 18:51     ` tmoran [this message]
2005-01-01  3:45       ` danmcleran
2004-12-29  4:49 ` Jeffrey Carter
2004-12-29 15:27   ` danmcleran
2004-12-29 16:53     ` Samuel Tardieu
2004-12-30  4:07       ` Jeffrey Carter
2004-12-30 15:31   ` danmcleran
2004-12-30 18:14     ` Jeffrey Carter
2004-12-31 17:55   ` danmcleran
     [not found]   ` <1104515735.052116.248180@c13g2000cwb.googlegroups.com>
2004-12-31 19:02     ` Jeffrey Carter
2004-12-29 19:05 ` Martin Krischik
2004-12-29 21:44 ` Stephen Leake
replies disabled

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