Possible Ada deficiency?
danmcleran_at_hotmail.com
Date: 12/31/04
- Next message: Nick Roberts: "Re: For the AdaOS folks"
- Previous message: Marven Lee: "Re: For the AdaOS folks"
- Next in thread: Jeffrey Carter: "Re: Possible Ada deficiency?"
- Reply: Jeffrey Carter: "Re: Possible Ada deficiency?"
- Reply: Martin Dowie: "Re: Possible Ada deficiency?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 Dec 2004 10:15:13 -0800
I would like to know if anyone else thinks that the inability to hide
private information from child packages is a deficiency in Ada95. I am
discussing ways to do this on another thread, (See Private area and
child packages), but it seems wrong that one has to go through a bunch
of machinations to do something like this. Wouldn't a language
construct for this be advantageous?
In C++ and Java, no private data can be seen by child classes. I think
that Ada would benefit from extending its information hiding
capabilities by allowing a package writer to conceal type information
from child packages.
What if Ada had a keyword, I've chosen 'concealed' for the sake of
discussion, to indicate that the implementation of a type was not
visible to the outside world (including child packages). Something like
this:
--This is not Ada!
package Some_Package is
type Not_So_Secret_Type is private; -- Child packages can see the
details
type Super_Secret_Type is concealed; -- Hidden from everyone
private
--child packages have full visibility
concealed
--not even child packages can see here
end Some_Package;
- Next message: Nick Roberts: "Re: For the AdaOS folks"
- Previous message: Marven Lee: "Re: For the AdaOS folks"
- Next in thread: Jeffrey Carter: "Re: Possible Ada deficiency?"
- Reply: Jeffrey Carter: "Re: Possible Ada deficiency?"
- Reply: Martin Dowie: "Re: Possible Ada deficiency?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|