[linux-audio-dev] (OT) C++ flame war
Kai Vehmanen
kai.vehmanen at wakkanet.fi
Thu Feb 6 13:01:01 UTC 2003
Ugh, OT for sure, but I just cannot resist the temptation to reply to this
thread any longer. ;)
On Thu, 6 Feb 2003, Paul Davis wrote:
> conceptually, i am not creating a distinct type of object - i want to
> provide a particular set of objects with access to a limited set of
> member functions belonging to an otherwise unified object. C++ won't
> let me do that - it forces me to use an abstract class, multiple
I'd say just use comments to express the access rules. Even though C++
provides public/protected/private, there's no way to actually enforce them
- if someone wants to access the private members, it's certainly possible
no matter what you do. So you might as well use public for these
targeted-for-certain classes sub-APIs and describe the intended audience
of the functions in comments.
Of course, when public/protected/private are enough, they should be used.
Standard language level concepts are always better, as the semantics are
known by majority of (competent) developers.
--
http://www.eca.cx
Audio software for Linux!
More information about the Linux-audio-dev
mailing list