From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Date: Wed, 2 May 2007 08:33:08 +0000 From: "Douglas A. Gwyn" Message-ID: <46377F65.E20D18F1@null.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit References: , <20070501144533.GA14908@ix.netcom.com> Subject: Re: [9fans] speaking of kenc Topicbox-Message-UUID: 5531202e-ead2-11e9-9d60-3106f5b1d025 Jon Snader wrote: > Indeed. This (_Bool) does seem to be a solution in search of a > problem. Is there anyone (other than a few refugees from Pascal) > who believes that C suffers from its lack of a formal boolean > type? Obviously there were. Numerous C programmers have created their own Boolean support, e.g.: typedef int bool; #define false 0 #define true 1 The fact that so many have done so argued that there was value in a standardardized facility along those lines. As to why the programmers thought it was worth doing, perhaps they like for data types to match their function, so the source code becomes more self-documenting and easier to understand; "int" conveys nothing about a Boolean nature, and actually suggests some sort of integral measurement of some property.