Path: utzoo!attcan!uunet!mcsun!hp4nl!targon!ruud From: ruud@targon.UUCP (Ruud Harmsen) Newsgroups: comp.lang.c++ Subject: Re: are 'friend's really necessary ?? Summary: Fundamental weakness of OOP ? Message-ID: <1082@targon.UUCP> Date: 19 Mar 90 14:07:25 GMT References: <169@pollux.kulcs.uucp> <10589@alice.UUCP> Reply-To: ruud@targon.UUCP (Ruud Harmsen) Organization: Nixdorf Computer BV., SWP, P.O. Box 29,Vianen, The Netherlands Lines: 22 In article <10589@alice.UUCP> ark@alice.UUCP (Andrew Koenig) writes: >In article <169@pollux.kulcs.uucp>, herman@kulcs.uucp (Herman Moons) writes: > >> I don't know whether this question appeared earlier on the net. >> Are there any *good* reasons for having the friend concept in C++ ? > >Sure. One of the most common is when you're writing several >interrelated classes. > Only too true. And isn't this also the fundamental weakness of the object oriented concept? For in the real world, and so in any realistic information system describing a part of that real world, *nearly all* classes are interrelated to *nearly all* other classes. Classes often only make sense just because of their relations to other classes. So if you have to use friends for that, everyone will be anybody's friend, and as a result of all this friendship, a *real* project in an OO-language tends to become just the same mess as it does in a traditional language, like C. (Note: I admit I don't have experience with OOT, but only more so with complicated applications).