Newsgroups: comp.lang.c
Path: utzoo!henry
From: henry@zoo.toronto.edu (Henry Spencer)
Subject: characters
Message-ID: <1990Sep18.162407.15525@zoo.toronto.edu>
Organization: U of Toronto Zoology
References: <371@bally.Bally.COM> <574@demott.COM> <13680@hydra.gatech.EDU> <2517@idunno.Princeton.EDU>
Date: Tue, 18 Sep 90 16:24:07 GMT

In article <2517@idunno.Princeton.EDU> pfalstad@phoenix.Princeton.EDU (Paul John Falstad) writes:
>I, for one, loathe the concept of signed chars.  I've wasted countless
>hours of programming time searching for bugs caused because I forgot that
>chars are signed by default.  I think chars (in fact, all integer types)
>should be unsigned by default.  Comments?

I believe I've heard Dennis Ritchie say that he'd consider making char
unsigned if he had to do it all over again.

Extending this to the rest of the integer types is silly, unless you
stop calling them (e.g.) "int" and make it, say, "nat" instead.  People
have this strange impression that something called "int" should behave
somewhat like an integer, and integers are signed by definition.  (The
difference between natural numbers and integers is the inclusion of
negative numbers.)
-- 
TCP/IP: handling tomorrow's loads today| Henry Spencer at U of Toronto Zoology
OSI: handling yesterday's loads someday|  henry@zoo.toronto.edu   utzoo!henry
