John Carmack: “Very early C compilers had all struct members in the same namespace, so you had to add prefixes like 'tc_size', 'ws_size', etc. Nowadays, there may be a dozen different 'size' members in a codebase. It is conceivable that understandability is actually lower with overloaded names.” reddit / BSD ---------------------------------------------------------------------- Mcnst · 2020-05-02 05:04 Anyone who worked on any BSD kernel will know what he's talking about here (e.g., `sc_`). :-) TIL the actual possible reasoning behind the naming conventions. ---------------------------------------------------------------------- r0ckf3lla · 2020-05-02 05:38 I didnt get it. Could anyone explain pls? ---------------------------------------------------------------------- ZarK-eh · 2020-05-02 15:49 Like we're five... ---------------------------------------------------------------------- Ubertekk · 2020-05-02 16:53 In the old days your program could only have one struct member named "size". This is why you see struct members named like tm_count in a time struct or whatever. Now you can have 2 different structs both have " size" as a member. He thinks this "improvement" may have hurt readability overall ---------------------------------------------------------------------- eg_taco · 2020-05-02 18:42 Pretty sure he’s talking about struct *member* names, not struct names. So if you made a struct `foo` with member `bar`, you couldn’t make another struct `baz` with member `bar`. At least that’s how I read it. ---------------------------------------------------------------------- Ubertekk · 2020-05-03 00:50 Yeah, my bad. My brain just had a moment there. I was even using struct member examples (tm_usec style stuff.)