So it's obvious that a string of things is a sequence of things, and so a sequence of characters/bytes/etc. might as well be called a string. But who first called them strings? And when? And in what context such that it stuck around? I've always wondered about this.
Etymology of String
history;strings;etymology
Can we get a real citation before Hugo's 1963 reference? Yes. John McCarthy used the word string in Recursive functions of symbolic expressions and their computation by machine, Part I, from April 1960.For atomic symbols, we shall use strings of capital Latin letters and digitsbut more usefully for this question, a reference to a string as a datatype:Any string of admitted characters [is] an L-expression.That's not a great example. By saying a string of characters, McCarthy is not using string in the specialised sense programmers mean it today. You can easily say a string to a Java programmer and they'll know that the of characters part is implicit: McCarthy's use doesn't demonstrate this feature. Let's try to push back to the 1950s, to see whether McCarthy was playing it safe or whether the term genuinely didn't exist then. LISP probably isn't going to help much here, as it's based on a mathematical calculus so McCarthy's string functions may have been the first application of the idea to string processing.An important string-processing system of the 1960s was 1964's SNOBOL, A String Manipulation Language. This cites McCarthy's paper above, but also discusses COMIT and SCL. The work they cite on SCL is unpublished: an unfortunate dead end.COMIT is easier to track down. The Art of Computer Programming (Volume 1, third edition, p.461) tells us that V. H. Yngve wrote a 1963 CACM article on it. But I'm looking for the earliest use of string, so I'll do an author search for earlier publications.The first I can find is A Programming Language for Mechanical Translation, from July 1958. This only contains one use of the word string:Each continuous string of letters between punctuation marks or spaces is looked up in the dictionary.Again, this use is like McCarthy's: this is not evidence for string being used in its present day sense. Looking at the paper in detail, we see that the data structure is a line on a card (allowing for continuations for longer lines).OK, we'll move forward in COMIT's history and see what we can get. The first useful reference is The COMIT system for mechanical translation, from the proceedings of a June, 1959 conference.If we want to replace D SIN(F) by COS(F) D (F), where F is unrestricted and may be any arbitrary sequence of constituents, we use the notation $ to stand for this string.This seems more akin to the way we use it today: string stands alone and as a bonus has a recognisable special symbol: the dollar sign is still used in some BASIC flavours to signify a string variable.From around this time, the word string also appears many times in A command language for handling strings of symbols by Perlis and Smith from the ACM '58 Proceedings, and once in The Share 709 System: Machine Implementation of Symbolic Programming by Boehm and Steel.Searching the ACM digital library for 'string' in the early 1960s yields 62 results, including titles like String handling in ALGOL, String Manipulation in the New Language and A list-type storage technique for alphanumeric information. It seems that the idea has become entrenched by then.I would argue that string in its computer science jargon sense as an ordered list of characters became common over a couple of years around 1960. Before that, authors like Yngwe and McCarthy could say string of characters and be sure that they were understood, but could not use string as a bare word in the sense it's used today.The shorthand was probably introduced to the computing mainstream by the Perlis and Smith paper. It hasn't been widely cited, but one important citation is Syntactic and semantic augments to ALGOL by Joseph W. Smith in April 1960 (in the same issue of CACM as McCarthy's description of LISP). From that paper:The purpose of this paper is to propose a set of syntactic and semantic augments to ALGOL. The proposed extensions are designed to facilitate the description of string manipulation in that language; they do not constitute a comprehensive language for symbol manipulation.To me, this constitutes evidence of string meaning a datatype for symbolic computation being affirmed in the academic lexicon, and importantly introduced to the tools used for commercial computation.Incidentally, Programming Languages: History and Future by Jean Sammet (1972) suggests that COMIT and SNOBOL were the progenitors of string manipulation, so I'm fairly confident that there won't be earlier examples.