The History Behind the Definition of a 'String'

Rob P. picture Rob P. · May 19, 2009 · Viewed 7.2k times · Source

I have never thought about until recently, but I'm not sure why we call strings strings. I am a .NET programmer, but I believe the concept of strings exist in virtually every programming language.

Outside of programming, I don't believe I've heard the word string used to describe words or letters. A quick Google of, 'Define: string' yields a bunch of definitions that have nothing to do with the concept of letters, words, or anything of the nature associated to programming.

My guess of it, is that, back in the day, strings were really just arrays of characters of a particular length, often with a delimiting character at the end. But, I don't see a natural transition from 'character array' to string.

Can someone offer up some insight to why we call strings strings?

Answer

CloudyMusic picture CloudyMusic · May 19, 2009

My assumption has always been that the programming term originated from the following definition of the word "string" (from Merriam-Webster):

(1): a series of things arranged in or as if in a line <a string of cars> <a string of names>

(2): a sequence of like items (as bits, characters, or words)

Since a string in programming is simply an ordered sequence of characters, referring to this as a "string of characters" (or simply "string") seems like the most probable origin.