[Grace-core] Information hiding

Andrew P. Black black at cs.pdx.edu
Thu Jun 7 21:31:07 PDT 2012


On 7 Jun 2012, at 13:07 , Kim Bruce wrote:

> To make the use of libraries effective, we will need a way of restricting information to within a module.  I am seeing lots of examples where I need the equivalent of Java's package scope.  A couple of classes need to reference the confidential portions of each other, but we don't want to make these methods public.  "Confidential" works fine for inheritance, but we need something more.
> 
> No need for immediate action, but we need to talk about "annotations" in general sometime soon.  Perhaps I can come up with a proposal based on my experience writing Grace libraries.
> 
> Kim
> 

Coming up with a semantics for this is very tricky.  I'm not convinced that it is necessary for a teaching language, since we can information hiding quite adequately  by convention.

Addressing this properly requires encapsulation policies; I don't believe that we can do those with annotations, since they require a run-time representation.

	Andrew


More information about the Grace-core mailing list