Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!purdue!gatech!gt-eedsp!baud From: baud@gt-eedsp.UUCP (Kurt Baudendistel) Newsgroups: comp.lang.c++ Subject: Re: Friend specifier considered harmful Message-ID: <424@gt-eedsp.UUCP> Date: 2 Sep 88 13:53:54 GMT References: <61@cybaswan.UUCP> Reply-To: baud@gt-eedsp.UUCP (Kurt Baudendistel) Organization: School of Electrical Engineering, Ga. Tech, Atlanta, GA 30332 Lines: 18 In article <61@cybaswan.UUCP> eeartym@cybaswan.UUCP (Dr R.Artym eleceng ) writes: > So far I haven't come across any situation where friends are really >necessary --- most cases seem to derive from a lack of object-oriented >structuring, or the requirements can be met with inline functions. the trick is that this may be true in the general case, but as with most things in c++, decisions are colored by the magic concept of *efficiency*. it is often in the programmers' best interests to use friends for this reason when creating related classes. a good example is vector and matrix classes. -- Kurt Baudendistel [GRA McClellan] Georgia Tech, School of Electrical Engineering, Atlanta, GA 30332 USENET: ...!{allegra,hplabs,ihnp4,ulysses}!gatech!gt-eedsp!$me INTERNET: $me@gteedsp.gatech.edu