|
|
|
|
|
by rwhaling
2034 days ago
|
|
Looks great! I have a question the planned Alpha 7 feature: "smaller than 32-bit values (char/byte)" - I'm so used to bytes being a fundamental primitive in programming languages that it's hard for me to imagine not immediately having access to them. Can you explain a bit why this is non-trivial, and what the implementation is going to look like? |
|
The B language, C's predecessor, did not have a char data type. Or int, either. Only a single type -- a 16 bit word then.
At the time, most computers used word addressing exclusively, so you couldn't directly access bytes, only words.
This is also why some early computers could easily be e.g. 36 bit machines, like the PDP-10.
C was, thus, an extension of B(CPL) to allow both words and bytes, or "char"s, using the PDP-11's brand new byte addressing. (among other additions like structs)