Standard library
In computer programming, a standard library is the library made available across implementations of a programming language. Often, a standard library is specified by its associated programming language specification, however, some are set in part or whole by more informal practices of a language community.
Some languages define a core part of the standard library that must be made available in all implementations while allowing other parts to be implemented optionally.
In many languages, the standard library often has its own namespace. For example, C++, D, and Rust use
std::﹡as the standard library namespace. C# usesSystem.﹡, while Java usesjava.﹡,javax.﹡andjdk.﹡. However, in some like Python and Go, there is no “standard library namespace” or common prefix for modules belonging to the standard library.As defined with the core language aspects, the line between the core language and its standard library is relatively subtle. A programmer may confuse the two aspects even though the language designers intentionally separate the two.
The line between the core language and its standard library is further blurred in some languages by defining core language constructs in terms of its standard library. For example, Java defines a string literal as an instance of the
java.lang.Stringclass. Smalltalk defines an anonymous function expression (a “block”) as an instance of its library’sBlockContextclass. Scheme does not specify which portions must be implemented as core language vs. standard library.
Printed 2026-09-26.