Re: Brian Kernighan, maybe I'm not worthy, maybe I'm scum



On Dec 31, 12:46 am, Richard Heathfield <r...@xxxxxxxxxxxxxxx> wrote:
Malcolm McLean said:

"Richard Heathfield" <r...@xxxxxxxxxxxxxxx> wrote in message
Malcolm McLean said:

The identity of char and byte, with hindsight, was a mistake.

I'm not convinced, Malcolm. What makes you think it's a mistake?

There's no logical connection between the number of bits used to
represent a human-readable character and the smallest addressible unit of
memory.

Thank you. I'm still not convinced, but your argument is not without merit..

Typically bytes are 8 bits and chars are ASCII, so sizeof(char)
equals 1 byte, but that's just a coincidence.

Well, ASCII is of course 7 bits, so it isn't even a coincidence. But it

No, dear Richard, it is 8 bits. It WAS 7 bits many years ago when we
discovered that it's a bad mistake to make word size a prime number
and not a power of two.

And, C code using char * to represent strings is NOT PORTABLE, my dear
fellow. To do anything useful in C, you use libraries of functions
which expect fixed types, and you have to audit code line by line
looking for Clever *** tricks...which break after the conversion.

Please stop obfuscating.

Thank you.
.


Quantcast