[comp.lang.c++] Re^4: information hiding

scs@itivax.iti.org (Steve C. Simmons) (06/28/89)

camarena@Apple.COM (Herman J. Camarena) writes:

>In article <1827@itivax.iti.org> scs@itivax.iti.org (Steve C. Simmons) writes:
>>hide the private interface .  . .  Put the public
>>parts in as you would normally, but place private in a separate file/dir,
>> . . . [my discussion of gid perms deleted by me]

>I think this approach does not work very well if you are developing the class.
>It could work if all your classes are "stable" at that point, of course the
>compiler should check the two copies to be sure they are consistant.

Such was my intent.  If you are developing the class you'd durned well
better have access to the private stuff!  My suggestion mentioned putting
the private parts in a private subdirectory of /usr/include, which most
developers don't exactly have access to . . .

As for checking the two copies for consistancy, I'm not sure what you're
asking.  There should be no duplicate declarations -- private parts in the
private subdirectory, public parts in the public dir, and #include reaching
from public into private.
-- 
Steve Simmons		          scs@vax3.iti.org
Industrial Technology Institute     Ann Arbor, MI.
"Velveeta -- the Spam of Cheeses!" -- Uncle Bonsai