From 8449165440309905329
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109fba,ac06fef48c3c04df
X-Google-Attributes: gid109fba,public
X-Google-Thread: f78e5,ac06fef48c3c04df
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1995-02-02 03:43:20 PST
Newsgroups: comp.lang.c++,comp.std.c++
Path: nntp.gmd.de!Germany.EU.net!EU.net!sun4nl!cwi.nl!olaf
From: olaf@cwi.nl (Olaf Weber)
Subject: Re: friends and local classes
Message-ID: <D3DF84.o8@cwi.nl>
Sender: news@cwi.nl (The Daily Dross)
Nntp-Posting-Host: havik.cwi.nl
Organization: CWI, Amsterdam
References: <FENSTER.95Jan24182929@ground.cs.columbia.edu> <3g5qc6$16p@news.cc.utah.edu>
	<3g5rei$dl8@news.panix.com> <9502801.16190@mulga.cs.mu.OZ.AU>
	<3glv86$dbg@hpsystem1.informatik.tu-muenchen.de>
	<3gpb3n$nh4@booz.bah.com>
Date: Thu, 2 Feb 1995 11:43:20 GMT
Lines: 32
Xref: nntp.gmd.de comp.lang.c++:88762 comp.std.c++:11304

In article <3gpb3n$nh4@booz.bah.com>, Doug Judd <djudd@ads.com> writes:
> schuenem@Informatik.TU-Muenchen.DE (Ulf Schuenemann) wrote:

>> IMHO, for the sake of othogonality one should regard everything
>> (including nested classes) inside a class as a member of that
>> class.  By definition a member has the _permission_ to access
>> private members of what it is member of. This would not only go for
>> memberfunctions but also for membertypes (ie nested classes),
>> respectively its memberfunctions.

> I disagree.  Take for example, an automobile engine class that
> defines a carburetor class and battery class.   Should the
> carburetor know about the battery?  When I go in to buy a new
> carburetor, should I tell the clerk what type of battery I have?

> I think not.

I think you misunderstood.  What Ulf means is that after

	class C {
		class N0 { ... };
		class N1 { ... };
		...
	};

the members of C::N0 and C::N1 would have access to all members of C.
He did not mean that the private parts of C::N0 should be accessible
to C::N1 or vice versa.  

This seems much more reasonable to me than the current situation.

-- Olaf Weber


