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.

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.String class. Smalltalk defines an anonymous function expression (a "block") as an instance of its library's BlockContext class. Scheme does not specify which portions must be implemented as core language vs. standard library.


Developed by StudentB