| ▲ | formerly_proven a day ago | |||||||
I’m guessing v4 C didn’t have structs yet (v6 C does, but struct members are actually in the global namespace and are basically just sugar for offset and a type cast; member access even worked on literals. That’s why structs from early unix APIs have prefixed member names, like st_mode. | ||||||||
| ▲ | topspin a day ago | parent | next [-] | |||||||
> I’m guessing v4 C didn’t have structs yet There may have been a early C without structs (B had none,) but according to Ken Thompson, the addition of structs to C was an important change, and a reason why his third attempt rewrite UNIX from assembly to a portable language finally succeeded. Certainly by the time the recently recovered v4 tape was made, C had structs: | ||||||||
| ▲ | Boltgolt a day ago | parent | prev [-] | |||||||
) | ||||||||
| ||||||||