Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!amdcad!ames!necntc!necis!mrst!sdti!turner From: turner@sdti.UUCP (Prescott K. Turner) Newsgroups: comp.lang.c++ Subject: Re: Friend specifier considered harmful Summary: 'acquaintance' specifier Message-ID: <311@sdti.UUCP> Date: 15 Sep 88 17:18:24 GMT References: <29433@bbn.COM> <8180@alice.UUCP> Reply-To: turner@sdti.uucp (Prescott K. Turner, Jr.) Organization: Software Development Technologies, Sudbury MA Lines: 24 In article <8180@alice.UUCP>, shopiro@alice.UUCP (Jonathan Shopiro) writes: >In article <29433@bbn.COM>, lpringle@bbn.com (Lewis Pringle) writes: >> The use of friends is not exacly what you want. Perhaps if in >> specifying a friend,you didn't give blanket access to the given class, >> but instead to just an explicitly stated set of members? >Good idea! In fact you can do exactly that, for example >... >Then Foo:bar() can access priv in any Foe object, but Foo::baz() cannot. No, that's not what he was asking for. It was for the ability to specify that a function could get at some of a class's private members, but not all. 'Protected' already gives us the ability to specify that some members are more private than others. What's lacking is a way to designate a function as something in between a run-of-the-mill function and a close friend. How about an 'acquaintance' keyword which works like 'friend' but which provides access only to protected and not private members? Not that I'm an advocate of this idea -- just attempting to home in on what was desired. -- Prescott K. Turner, Jr. Software Development Technologies, Inc. 375 Dutton Rd., Sudbury, MA 01776 USA (508) 443-5779 UUCP:...genrad!mrst!sdti!turner