Learn English – the origin of the term “library” (in programming sense)

etymologyorigin-unknown

If you talk about a library to any computer programmer today, the image they will most likely conjure up is of some software package, a body of helpful and reusable functions they can link and call to achieve certain tasks. Not likely, the original meaning of the word – that big, ugly building that is home to tons of books!

Yet, if you think about it, there is hardly any similarity between the two, a function or module is a very appropriate engineering term. The only common point is that they are both helpful reference points. But then, programming libraries aren't just "read" like books, they are integrated, called and acted upon to do one's bidding. Besides, a programming library can be compared to many other things too such as a factory, warehouse, robot, helper, assistant, supporter, etc. Each of these can equally be substituted for a programming library and the meaning won't alter much. So, why was the word library chosen to describe such projects?

Best Answer

In the early days of computers, when mainframes were pretty much the only option, hierarchical directories such as we find on modern computers were not used very much, mainly because the algorithms for directory maintenance were very inefficient, especially when directories contained a large number of entries. For this reason, source files and object files were often stored in what were called library files, or just libraries. (They were something like archive files that are used today.) The directories of these files were implemented in various ways, sometimes using ISAM (indexed sequential access method).

With the advent of efficient B-tree pruning algorithms, source and object files can now be stored directly in system directories without any impact on performance, but such collections of files are sometimes still referred to as libraries.