Spiegato, Home

Technology and Gadgets

What Is a Standard Library?

  • Published by Spiegato
  • 2 min read

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.

Key terms in this article

Related articles

  • What is the Information Technology Infrastructure Library?

    The Information Technology Infrastructure Library (ITIL®) is a series of books that describe methods for implementing and managing information technology…

  • What Are Arduino® Libraries?

    Arduino® is a popular electronics platform for hobbyists and professionals. The hardware, known as Arduino® boards, comes in several varieties and can be…

  • What Is an OpenCV Library?

    An Open Source Computer Vision Library (OpenCV) library is a collection of processes and algorithms that add new functionality to the total OpenCV…

  • What is a Virtual Tape Library?

    A virtual tape library (VTL) combines tape backup emulation software with hard disk architecture to provide a superior archival backup solution. It is…

  • What Is an Electronic Reference Library?

    An electronic reference library is a collection of information from various sources that is gathered and stored in digital form, allowing access to the…