Learn something new every day
More Info... by email
In computer programming, a standard library is a series of functions, constants and other language definitions that are included as part of the core compiler package. The standard library provides a programmer with the basic ability to create simple programs and manipulate basic data. It also provides the ability to somehow interact with the host operating system so information processing does not become a trivial task. All implementations of a given language compiler include the standard library, and it is generally downwardly compatible with previous versions of the library so basic language functionality is preserved as it evolves over time.
A library, in a broad sense, is a collection of procedures, functions, classes or other elements of a computer program that are available to a programmer. These elements are usually grouped into categories that define their functionality, such as input, output and process handling. Some libraries rely on other libraries to work properly, a concept called dependence. Important variables, such as the maximum value of an integer data type or the numerical definition of a null character, can be stored in a library. They also are usually already compiled pieces of computer code, preventing harmful modifications and protecting proprietary programming code.
A standard library strives to include all basic and necessary features that a broad range of programs will require to run in one way or another. This has to be balanced against including too many libraries. A large standard library means that, in some languages, the distribution size of a completed program could be incredibly large and bloated with libraries that are never used. Including too many files in a standard library also can lead to problems with development of the language, because features that are infrequently used must be updated with each language or compiler change, increasing the amount of work required for a new release.
Conversely, a standard library that has too little functionality can lead to each programmer having to custom install external libraries and include them specifically in program releases. This can lead to a type of secondary, community-driven maintenance of a standard that is not controlled by the primary language development team. Some languages adapt to such situations by including commonly used libraries into the standard set when the community has made the need clear.
Different languages have different design philosophies about what should be in the standard library. Additionally, the mechanics behind how the compiler creates an executable program also can determine the parameters for the library. Interpreted languages tend to have a larger collection of libraries in their standard set, while low-level languages often have very few.
One of our editors will review your suggestion and make changes if warranted. Note that depending on the number of suggestions we receive, this can take anywhere from a few hours to a few days. Thank you for helping to improve wiseGEEK!