[comp.lang.c++] Proposal for group access in C++

lee@hhb.UUCP (lee daniels ) (04/11/91)

I believe that C++ is missing a very important access specifier
and would like to start a discussion to clarify whether there is
merit in this suggestion or whether there is another satisfactory
way to acheive the same thing within C++ today.

The access specifier similar to the group protection in unix.

Large systems are usually made up of subsystems and within a
subsystem there is functionality that is intended to be exported
for use strictly within the subsystem and not exported to the world.
Making the methods private and then calling all other classes in
the subsystem a friend grossly abuses the intentions of the friend
classification and effectively eliminates the user/private
protection level.

To be more specific, I am suggesting that "group:" be added as an
access specifier and that a class specify those eligible to access
its group protected members using "group class xyzzy;" within its
declaration.

If we want to carry this suggestion one more step, named groups can
be supported with the group members defined outside of the individual
classes.


The floor is now open for flames!!


p.s. For those who believe that all access specifiers must start
     with the letter 'p', "peergroup" could be used instead.


Lee Daniels
Director, Design Software  uucp path:  princeton!hhb!lee@uunet.uu.net
Racal-Redac, Inc.          (201) 848-8000
1000 Wyckoff Avenue,       Mahwah, New Jersey  07430