The right choice would probably be to make it signed because everything is an int in trad C and all other trad types are signed unless explicitly specified as unsigned.
Not that I disagree with making basic types unsigned by default, just not in C.
Not that I disagree with making basic types unsigned by default, just not in C.
char - unsigned 8 bits
byte - signed 8 bits
ubyte - unsigned 8 bits
char is used for utf-8, byte and ubyte are signed and unsigned small integers. This seems like small thing, but it makes D code much more readable than C.I bet a lot of existing C code will break if one sets char to signed with a compiler switch.
Anybody reviewing C code and sees just char will have to waste time wondering if the code handles the implementation-defined signed-ness correctly.
And yes, I know about stdint.h, a poor attempt to deal with this problem.