Path: utzoo!attcan!uunet!mcvax!ukc!reading!cf-cm!cybaswan!eeartym From: eeartym@cybaswan.UUCP (Dr R.Artym eleceng ) Newsgroups: comp.lang.c++ Subject: Re: Friend specifier considered harmful Message-ID: <77@cybaswan.UUCP> Date: 12 Sep 88 02:46:16 GMT References: <61@cybaswan.UUCP> <1988Sep2.094800.16353@LTH.Se> Reply-To: eeartym@cybaswan.UUCP (Dr R.Artym eleceng ) Organization: University College of Swansea Lines: 36 In article <1988Sep2.094800.16353@LTH.Se> dag@Control.LTH.Se (Dag Bruck) writes: > I regard "friend" functions as a way of bending the rules a little, in > order to avoid bigger trouble -- rather like a white lie. While this > may not be as clean as one would like, it is defendable if you stress > practical software engineering. I have seen many Modula-2 and Ada > programs where the writer has been "forced" to use very large modules > because of too strict encapsulation. Maybe this stemmed from lack of inheritance. Why do you say strict encapsulation is to blame? > No, but I think my programs have improved by the use of a few friend > functions and classes. Can you supply any details? > General comment: I think this raises the issue that class design is a > demanding task, especially if other people are going to use the > classes in another conext. Should we start a discussion of GOOD > design of classes? This would be a very worthwhile endeavour. I hope you're reading comp.lang.smalltalk, as there's something along these lines in progress there. -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Keywords: Parallel, Applicative, and Object-Oriented Languages and Systems --------------------------------------------------------------------------- Dr. Richard Artym, + UUCP : ..!ukc!pyr.swan.ac.uk!eeartym Electrical Engineering Dept., + JANET : eeartym@uk.ac.swan.pyr University of Wales, + Phone : [(0792) or (+44 792)] 295536 Swansea, SA2 8PP, + Fax : [(0792) or (+44 792)] 295532 U.K. + Telex : 48358 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~