Take the 2-minute tour ×
English Language & Usage Stack Exchange is a question and answer site for linguists, etymologists, and serious English language enthusiasts. It's 100% free, no registration required.

I've noticed that in computer programming, underscores are used extensively to create names that are technically one word long but consist of several different words. For example, C++ has priority_queue or get_temporary_buffer. However, this use case only exists because it's easier for software to split apart source code using whitespace as boundaries. In fact, in every case I can think of where I've seen underscores used, the rationale has always been to simplify some automated process.

Did the underscore character exist before computers were invented? If so, what were they used for?

share|improve this question
2  
Technically speaking, it would be easier for the computer to parse variable names with whitespace in them than it would be for the programmer and maintainers due to a programming language's strict syntax rules. In other words, there would be a clearly defined behavior for the computer but it would confuse the hell out of us humans because we think we already know what whitespace means. –  MrHen Mar 25 '11 at 16:05
2  
To add to @MrHen's accurate observation, a computer can parse on one character just as easily as it can on any other character. Most computer languages are designed to parse on blank spaces because humans are accustomed to parsing on blank spaces. –  oosterwal Mar 25 '11 at 16:33
add comment

closed as off topic by Robusto, kiamlaluno, Kosmonaut Apr 14 '11 at 13:20

Questions on English Language & Usage Stack Exchange are expected to relate to English language and usage within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 17 down vote accepted

Yes. The underscore appeared first on mechanical typewriters, and was used as a combining glyph to underline text. You would type your text, then move the carriage back the beginning of the word, and type a series of underscores. It was also used to create horizontal “fill in the blank” lines, such as:

   Name: ________________
Surname: ________________

You can read more on the Wikipedia article.

share|improve this answer
    
It was also handy for making check boxes with an underscore on two lines for the top and bottom and exclamation marks ! for the sides. Not all typewriters had a vertical bar |. –  oosterwal Mar 25 '11 at 16:35
    
LOL, unbelievable that I learned how to type on a typewriter and used underscores exactly in this manner yet both seem to be historical curiosities to kids these days. Didn't realize I was THAT old. –  Apprentice Queue Jan 29 at 22:09
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.