[comp.lang.c++] Where is "private:" documented?

bs@alice.UUCP (Bjarne Stroustrup) (08/28/88)

In article <COOPER.88Aug26111736@gecrux.steinmetz.ge.com>, cooper@kbsvax.UUCP (Clark Cooper) writes:
> 
> 	I've noticed in several examples appearing over the network the use
> of "private:" in class declarations. While the use seems clear, "private"
> is not listed as a keyword or otherwise documented in Stroustrup. Where is
> its use documented (at least with respect to GNU C++). Is it just ornamental?
> Can we do anything with it that we can't do without it?
> 

My paper ``The Evolution of C++: 1985-1987'' that I presented at
the USENIX C++ ``workshop'' in Santa Fe describes all extensions
to C++ in the timespan mentioned and documents a few points that
are not extensions but where the documentation had left doubts
about the intent.

``private:'' was introduced to support people that wanted more
freedom in laying out their code, especially people who wanted
the public part to come first. It is a ``cosmetic'' feature.

dtw@f.gp.cs.cmu.edu (Duane Williams) (08/28/88)

In <8138@alice.UUCP>, Bjarne Stroustrup, writes:
| ``private:'' was introduced to support people that wanted more
| freedom in laying out their code, especially people who wanted
| the public part to come first. It is a ``cosmetic'' feature.

Even if only "cosmetic," it is a nice feature.  Even though I routinely put
private stuff first, I still write

	class ... {
	private:
		...
	public:
		...
	};

Why?  Because this makes the code much more intelligible, esp. to people who
are not C++ wizards.

Duane
-- 
uucp: ...!seismo!cmucspt!me.ri.cmu.edu!dtw
arpa: dtw@cs.cmu.edu