From: Rick <rickduley@gmail.com>
Subject: 'private' and Privacy
Date: Tue, 7 Jul 2009 19:48:56 -0700 (PDT)
Date: 2009-07-07T19:48:56-07:00 [thread overview]
Message-ID: <843a36b0-041d-4826-98b4-0fbcb1a4d287@d9g2000prh.googlegroups.com> (raw)
I have never fathomed out why we declare entities in packages to be
'private' and then have to go and tell the world what is in them. I
would assume that 'private' has something to do with 'information
hiding' yet we expose what is 'private'.
I have:
KEYPAD_ROWS_COUNT : constant Positive := 2;
-- The number of rows on a keypad.
KEYPAD_COLUMNS_COUNT : constant Positive := 2;
-- The number of columns on a keypad.
type Keys_Type is array
(1 .. KEYPAD_ROWS_COUNT, 1 .. KEYPAD_COLUMNS_COUNT)
of Gtk.Key_Button_Pkg.Gtk_Key_Button_Access;
--Intermediate, addressable storage of keys for the keypad.
I am trying to find a way to ensure that the user only addresses items
in the array in the manner I provide rather than making use of the
information clearly visible about the range of the array. I can use
functions instead of constants to define array range values but they
have to be fully declared before I define the array - and this exposes
that which I wish to remain private (the actual range).
Isn't this a contradiction in terms, or _is_ there a way to retain
'Privacy'?
--------------------------------------------
Rick Duley
North Perth,
Western Australia
http://rickduley.webs.com
.-_|\
/ \
perth *_.-._/
v
aussie : 0409 106 049
o'seas : +61 409 106 049
--------------------------------------------
"Answers are easy;
it's asking the right questions
which is hard."
The Doctor (Dr Who: The Face of Evil (1977)"
next reply other threads:[~2009-07-08 2:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-08 2:48 Rick [this message]
2009-07-08 2:48 ` 'private' and Privacy stefan-lucks
2009-07-08 6:51 ` Gautier write-only
2009-07-08 12:47 ` Ludovic Brenta
2009-07-08 15:25 ` (see below)
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox