Now I'm thinking about how the ASR33 teletype doesn't have a way to type [] brackets nor {} brackets... And also if you send it ASCII underscore _, that gets displayed as an arrow pointing to the left ...

Don't remember where I read that, but supposedly by the type C and UNIX were being made, they had upgraded to Model 38 teletypes, which do have a way to type "all 128 ASCII characters" according to the manual

Notice the positions of [] and {}, that seems inconvenient to me, but maybe it's just because of habit...

That same... article? blog post?... may have also said that how _ gets printed as on the ASR33 is a reason why early UNIX code avoids underscores (it also avoids camelCase; note that the ASR33 is case-insensitive) and tries to just make the variable name short enough that none of it is needed

Though also: Didn't early C compilers have a length limit on identifiers that was just 8 characters or so?

@vaporeon_ 6 significant initial characters for external identifiers as of ANSI C (case sensitivity not required)! 31 and case sensitivity for internal identifiers, including macro names.

@alyssa I somehow wasn't aware that ANSI C still had this limitation... So if I'm writing a library in C (targeting older systems that do not have any newer versions of C), I should make sure that every external symbol has distinct 6 characters at the start?

Follow

@vaporeon_ notionally, at least. probably in practice many actual implementations guaranteed more than that but i have no idea.

C99 increased it to 31 for external identifiers (63 for internal) and i think guaranteed case sensitivity, so you don't need super recent to have it guaranteed (and probably most or all implementations had less constrained limits by then anyway)

Sign in to participate in the conversation
📟🐱 GlitchCat

A small, community‐oriented Mastodon‐compatible Fediverse (GlitchSoc) instance managed as a joint venture between the cat and KIBI families.