May 02, 2005
In article <d51vdc$23uo$1@digitaldaemon.com>, Matthew says...
>
>Is there a mechanism for making things private to the current class only, and _not_ the package.

You could use "protected."  Though this obviously means that the data is visible to a derived class.

>For example, in the expansion to Open-RJ we need to be able to prevent the Record class from having write access to any of the members of the Field class, in order to ensure there are no erroneous breaking of the immutable characteristics of the Field type. But because they are - have to be - defined in the same package, anything can scribble on anything else. Horrid.

I'd like to believe that a module writer won't violate principles he's invented. But I agree that it would be nice to have an easy way to verify this at compilation-time.


Sean


1 2
Next ›   Last »