From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: From: Charles Forsyth Date: Sun, 29 Apr 2007 21:47:43 +0100 To: 9fans@cse.psu.edu Subject: Re: [9fans] speaking of kenc In-Reply-To: <9ce51c75b076ab51a54e2c0352417143@coraid.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: 52747f48-ead2-11e9-9d60-3106f5b1d025 >why would a typedef- or enum-based boolean type >fail to serve this purpose, assuming one is convinced >of the need for a boolean type. that's easy, and that's why one reason i picked on _Bool: it has a special new conversion rule (added to `the usual arithmetic conversions') that can't be done using typedefs or enums, namely that any non-zero value converts to 1. that is needed to work with the existing conditional structure. it's all done to satisfy all earlier right-thinking people, who thought that languages without a boolean type were clearly depraved, that this zero/non-zero stuff was just perverse, and therefore added boolean themselves (differently) using typedefs and enums; which didn't work correctly. they couldn't get that right, but they could fill in the right documents and do the political work to change the standard.