🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Incrementing a bool

#1492
From: James Kanze US/ESC 60/3/141 #407...
Date: Thu, 03 Aug 1995 15:54
32 lines
2022 bytes
In article <DCBsLu.n1A@research.att.com> ark@research.att.com (Andrew
Koenig) writes:

|> In article <1995Jul26.030356.21528@sq.sq.com> msb@sq.sq.com (Mark Brader) writes:

|> > No, that's not what I'm saying.  I'm saying that there is no justification
|> > for adding to the language a type specific to boolean values, when such
|> > values can already be manipulated in any of several types.  (One of which
|> > is indeed int.)  Dennis Ritchie got it right.

|> The justification is:

|> 	1. Unless bool is a separate type, there's no way to overload on it.

|> 	2. It can't be a user-defined type because there's no way
|> 	   for users to define the type of expressions like 3<4.

|> Because C doesn't have overloading, this is much less of an issue for
|> C than it is for C++.

Actually, if I remember your proposal correctly, the main
justification given for the bool type was existing practice: every
major library has one.  And most of the examples were in fact C, not
C++.  (A quick grep over the X11 include files, for example reveals
typedefs/#defines for Boolean, boolean, Bool and BOOL.)

Obviously, some programmers *have* felt the need for such a type.
-- 
James Kanze         Tel.: (+33) 88 14 49 00        email: kanze@gabi-soft.fr
GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
Conseils en informatique industrielle --
                              -- Beratung in industrieller Datenverarbeitung
Technical Details
Message-ID: <KANZE.95Aug3175431@slsvhdt.lts.sel.alcatel.de>
Path: arc1-ca.pugleaf.net!xlink.net!slsv6bt!news
References: <1995Jul22.022031.10937@sq.sq.com> <3uuprl$frm@newsbf02.news.aol.com> <1995Jul26.030356.21528@sq.sq.com> <DCBsLu.n1A@research.att.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c++,comp.std.c
Path: arc1-ca.pugleaf.net!xlink.net!slsv6bt!news
From: kanze@lts.sel.alcatel.de (James Kanze US/ESC 60/3/141 #40763)
Subject: Re: Incrementing a bool
In-Reply-To: ark@research.att.com's message of Wed, 26 Jul 1995 13:39:29 GMT
Message-ID: <KANZE.95Aug3175431@slsvhdt.lts.sel.alcatel.de>
Sender: news@lts.sel.alcatel.de
Organization: SEL
References: <1995Jul22.022031.10937@sq.sq.com> <3uuprl$frm@newsbf02.news.aol.com>
 <1995Jul26.030356.21528@sq.sq.com> <DCBsLu.n1A@research.att.com>
Date: 03 Aug 1995 15:54:31 GMT