On Thu, 2002-07-11 at 19:51, Albert D. Cahalan wrote:
> Bastien Nocera writes:
>
> > For kicks, read paragraph I there:
> > http://www.alumni.caltech.edu/~pje/soskr.html
>
> That rant is wrong in many ways.
>
> The "if (x=5)" problem would best be fixed by
> using ":=" for assignment. Typing is strong enough
> as it is, annoyingly so when trying to align pointers
> with bit operations. You don't need a bool.
boolean is good.
> The "char" type was signed. It did not need to be
> specified; it could not be anything but signed
> since the "signed" keyword did not exist.
See other mail.
> For performance, the default should have been that
> the compiler could mix signed and unsigned operations
> as desired. (you get a 7-bit char with 1 padding bit,
> a range of 0..127, overflow behavior is random, and
> no this doesn't really prevent using that extra bit
> when dealing with text)
>
> This isn't Pascal. C supports Duff's device for
> unrolling loops:
>
> tmp = counter >> 2;
> switch(counter & 3){
> while(x--){
> foo();
> case 3:
> foo();
> case 2:
> foo();
> case 1:
> foo();
> case 0:
> }
> }
>
> In keeping with the spirit of C, a "missing" case
> should invoke undefined behavior. (letting the compiler
> optimize a bit more, not needing to check for boundry
> conditions)
What does this have to do with anything ? It was the only page that
talked about K&R and signed/unsigned char I could find in a reasonable
amount of time.
--
/Bastien Nocera
http://hadess.net
Attachment:
signature.asc
Description: This is a digitally signed message part