[net.lang.c++] C++ info

bs@alice.UucP (Bjarne Stroustrup) (02/28/86)

> From: sdy@ssc-bee.UUCP (Steven D Yee)
> Newsgroups: net.lang.c++
> Subject: C++ reference request
> Organization: Boeing Aerospace Co., Seattle, WA
>
> I've been noticing the c++ articles in net.lang.c and now that
> there is this group could someone please send me a reference
> (or pointer too) that gives a general overview of C++ as a language
> I have no knowledge of it at all but would like to learn.
>
> also is it commercially available? how bout cross-compiling to
> an MC68020 & 68881?

Ok, it is time for another dump of general C++ information:

	With very minor exceptions C is a subset of C++.
	The key concept added to C to get C++ is a Simula-like class.
	C++ is link compatible with C.
	No run time efficiency is lost compared to C.

C++
	- is a better C
		- function argument type checking and coercion
		- scoped & types constants
		- inline functions
		- overloaded function names
		- free store operators (new & delete)
		...
	- supports Data Abstraction
		- data hiding
		- optional guaranteed initialization (constructors)
		- optional guaranteed cleanup (destructors)
		- operator overloading
		- references
		...
	- supports Object Oriented Programming
		- derived classes (single inheritance)
		- virtual functions

You can read about the language in

		Bjarne Stroustrup: The C++ Programming Language
		Addison Wesley, 1986, ISBN 0-201-12078-X
		336 Pages. Recommended price $22.95

You get an implementation from

		AT&T Software Sales and Marketing
			Post Office Box 25000
		Greensboro, North Carolina  27420
		(800) 828-UNIX or (919) 279-3666)
Or
		AT&T Unix Pacific Co.,Ltd.
		Nippon Press Center Bldg.
		2-2-1, Uchisaiwai-cho
		Chiyoda-ku, Tokyo 100 Japan
Or
		UNIX Europe Limited,
		27A Carlton Drive, London SW15 2BS, England.
		Tel: +44 1 785-6972, fax: +44 1 785-6916,
		EUnet: mcvax!ukc!uel!uel.

They charge universities $250 others $2K
(so, yes, it is commercially available).

The main part of implementation is a compiler front-end that
translates C++ into C. This front-end (called ``The AT&T C++
Translator'' or colloquially, cfront) performs all syntax and
type checking, the underlying C compiler is used as a code
generator only. This two stage compilation process has two main
effect:
	- errors are found about 3 times faster by the C++ compiler
		than by the C compiler.
	- when there is no bugs the compilation takes 50% to 100%
		longer than for a C program.

The version shipped by AT&T is for a VAX or an AT&T 3B running UNIX
(SysV and BSD). Once you have it running on such a machine porting
to any machine with a good C compiler is easy provided the target has

	- enough memory (about 1Mb to compile cfront)
	- long names (both in the C compiler and the linker)

Porting cfront without first bringing C++ up on a VAX or 3B is possible,
but probably hard work.

C++ is in use on
	- Amdahls
	- AT&T 3Bs
	- M68Ks (Suns, Apollos, etc.)
	- Pyramids
	- VAXs
	and several other other UNIX boxes.

- Bjarne Stroustrup (AT&T Bell Labs, Murray Hill)