No subject
Andreas Kostyrka
andreas at kostyrka.org
Sat Jul 2 11:43:22 EDT 2005
Am Samstag, den 02.07.2005, 15:11 +0100 schrieb Tom Anderson:
> On Fri, 1 Jul 2005, Andreas Kostyrka wrote:
>
> > Am Freitag, den 01.07.2005, 08:25 -0700 schrieb George Sakkis:
> >
> >>> Again, how? Is there a way to force that an external user of my lib can
> >>> not use my internal data/methods/classes, unless he uses odd compiler
> >>> hacks?
> >>
> >> I never understood how mainstream OO languages expect the designer of a
> >> class to know in advance that an attribute should be hidden or
> >> unnecessary to its subclasses by being declared "private" instead of
> >> "protected".
> >
> > The problem is, that the classic private/protected/public visibility
> > tags try to solve multiple problems.
> >
> > Private: Ok, that's all that's really only for the implementation.
> > public: Well, that's all for my "customers". Hmm. What if I've got two
> > kinds of customers? Say a customer like in bank customer, and second
> > customer that plays the role of the bank employee? oops.
>
> C++ has 'friend' for that:
>
> http://www.cplusplus.com/doc/tutorial/tut4-3.html
Well, than you have to know who your friend is, don't you? And my friend
comes on "private" term, doesn't he? *g*
Andreas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://mail.python.org/pipermail/python-list/attachments/20050702/55d8d99b/attachment.sig>
More information about the Python-list
mailing list