From: Dmitry A. Kazakov <mailbox@dmitry-kazakov.de>
Subject: Re: Need advice re package organization.
Date: Mon, 28 Jul 2003 10:38:44 +0200
Date: 2003-07-28T10:38:44+02:00 [thread overview]
Message-ID: <5jn9ivoetll1fu2avn9hmjj6aaa7q7pmjn@4ax.com> (raw)
In-Reply-To: M2YUa.972$XK4.65085@read1.cgocable.net
On Sun, 27 Jul 2003 18:02:08 -0400, "Warren W. Gay VE3WWG"
<ve3wwg@cogeco.ca> wrote:
>Robert I. Eachus" <rieachus@attbi.com> wrote in message news:3F22F9E9.3040307@attbi.com...
>> Warren W. Gay VE3WWG wrote:
>>
>> > [As a side note, I sometimes wonder if an enhancement to the Ada0Y
>> > language might be to be able to specify a limited visibility of a
>> > parent package's object's internals (a la not "protected" type in
>> > C++). A protected class in C++ allows derived code to mess with the
>> > internals, whereas normally the parent object's elements are a
>> > black box. Use of limited visibility helps to reduce code coupling.]
>>
>> Actually, that is what a private child package is for. It allows you to
>> move all of the "useful" internals out of a package body to a place
>> where the body and all the child packages can access them.
>
>Actually, what I had in mind was the object visibility here (not
>package visibility). When deriving from existing tagged records, there
>is no way to limit the visibility of the parent object's members (a
>la "protected" in C++/Java). A derived object can freely mess with any
>tagged record's members, as it sees fit. Information hiding
>and reduced coupling practices suggests that this is not the safest
>route (best to use the existing parent object methods to mess with
>the "parent members").
I do not know whether there is a statistics regarding use protected
vs. private, but I think that most C++ programmers just stick to
public vs. not. Burden of decision is too heavy for many.
What I would like to have
1. multiple parents;
2. an ability to choose which members are public and which are not
(presently one needs a two-stage deriving);
3. an ability to have public read-only members with full access in the
private part;
4. a finer control over overridings (a vast theme).
---
Regards,
Dmitry Kazakov
www.dmitry-kazakov.de
next prev parent reply other threads:[~2003-07-28 8:38 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-07-26 13:08 Need advice re package organization Bobby D. Bryant
2003-07-26 14:25 ` Robert I. Eachus
2003-07-26 15:27 ` Warren W. Gay VE3WWG
2003-07-26 22:00 ` Robert I. Eachus
2003-07-27 22:01 ` chris
2003-07-28 2:53 ` Robert I. Eachus
2003-07-29 4:52 ` Richard Riehle
2003-07-27 22:02 ` Warren W. Gay VE3WWG
2003-07-28 8:38 ` Dmitry A. Kazakov [this message]
2003-07-29 17:18 ` Warren W. Gay VE3WWG
2003-07-30 8:42 ` Dmitry A. Kazakov
2003-07-30 21:00 ` Warren W. Gay VE3WWG
2003-07-30 22:46 ` Randy Brukardt
2003-07-31 16:39 ` Warren W. Gay VE3WWG
2003-07-31 17:31 ` Randy Brukardt
2003-07-31 21:00 ` Warren W. Gay VE3WWG
2003-07-31 22:13 ` Robert I. Eachus
2003-08-01 12:51 ` Warren W. Gay VE3WWG
2003-07-31 5:57 ` Matthew Heaney
2003-07-31 16:57 ` Warren W. Gay VE3WWG
2003-07-31 22:33 ` Robert I. Eachus
2003-08-01 2:58 ` Chad R. Meiners
2003-08-01 13:51 ` Stephen Leake
2003-08-01 22:15 ` Robert I. Eachus
2003-08-04 13:45 ` Stephen Leake
2003-08-01 13:01 ` Warren W. Gay VE3WWG
2003-07-31 9:04 ` Dmitry A. Kazakov
2003-07-31 16:59 ` Warren W. Gay VE3WWG
2003-07-31 20:41 ` Randy Brukardt
2003-07-31 21:15 ` Warren W. Gay VE3WWG
2003-08-01 20:04 ` Randy Brukardt
2003-08-01 21:33 ` Stephen Leake
2003-08-04 19:40 ` Randy Brukardt
2003-08-04 19:52 ` Stephen Leake
2003-08-05 3:36 ` Richard Riehle
2003-08-05 4:03 ` Hyman Rosen
2003-08-05 7:16 ` Dmitry A. Kazakov
2003-07-26 17:03 ` Nick Roberts
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox