4 ms·
Why are variables in C named so obscurely? Why rndval instead of random_value, for example? Autocomplete barely existed back then, and was something performed
by egypturnash 5y ago
Why are variables in C named so obscurely? Why rndval instead of random_value, for example?
Autocomplete barely existed back then, and was something performed by purpose-built TSRs that maintained their own text expansion dictionaries, rather than a thing your text editor automatically did by scanning the current file for things you might be trying to type. "r a n d o m shift - v a l u e" is a lot more to type by hand than "r n d v a l".
And even if you did have that you'd still have to deal with coding on a textmode screen that was probably 80x50 characters. Maybe 132x60 if you had a really top-of-the-line video card. Not much room for those long variable names.
(Admittedly the C code under discussion was written long after the original assembly routine was written, but by someone who'd spent a lot of time with his head in the source of these games, absorbing the idioms of early-nineties programming.)
- AnIdiotOnTheNet 5y agoAdditionally, in the before-times, in the long-long-ago, some C compilers had really absurdly short identifier limits. Like, 8 characters short. They'd usually let you use more than 8 characters, they'd just ignore the extras. Fun times.
- egypturnash 5y agoflashbacks to the wonderful 8-bit BASICs that only cared about the first two characters of a variable name