🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #2890

Re: stop adding keywords to C++

#2890
From: Andrew Koenig
Date: Wed, 06 Dec 1995 18:47
41 lines
2183 bytes
In article <Pine.SOL.3.91.951203010216.13007A-100000@barney> mzhou01 <mzhou01@barney.poly.edu> writes:

> With all respect. I am not happy with the way the committe is 
> modifying the C++ language. I think you people are enlarging the language 
> by adding un-
> necessary keywords to it. For example the boolean type, true, false keywords. 
> I spoke to my university friends about this addendum and they feel the
> say way as I do. Why do we need in boolean type? If it was really
> necessary Dennis Ritchie would have put it in C in the place. He didn't  
> put it in because boolean can be easily create using the language itself, 
> ie: the #define or emum, and Stroustrup didn't added in his second editon.

You are quite right: C does not need a built-in Boolean type.

But C++ does, mostly because of function overloading.  Function overloading
makes the types of expressions much more visible, because an expression with
an inappropriate type can cause the wrong function to be called.

So, in particular, if boolean were a library-defined class type, we might
be able to write

	void foo(int);
	void foo(bool);

but there would be no way to make foo(3<4) call foo(bool) instead of foo(int).

> P.S. Is Stroustrup on the stardardization team? Does he get the final
>      say since it is his language?

Stroustrup is on the committee.  He does not get final say,
nor does any other single individual.  People do listen to him, though.
-- 
				--Andrew Koenig
				  ark@research.att.com


---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <DJ626y.8rz@research.att.com>
Path: arc1-ca.pugleaf.net!howland.reston.ans.net!agate!agate!Matt
References: <Pine.SOL.3.91.951203010216.13007A-100000@barney>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!howland.reston.ans.net!agate!agate!Matt
From: ark@research.att.com (Andrew Koenig)
Newsgroups: comp.std.c++
Subject: Re: stop adding keywords to C++
Date: 06 Dec 1995 18:47:05 GMT
Organization: AT&T Bell Laboratories, Murray Hill NJ
Approved: Matt@Austern
Message-ID: <DJ626y.8rz@research.att.com>
References: <Pine.SOL.3.91.951203010216.13007A-100000@barney>
NNTP-Posting-Host: austern.hip.berkeley.edu