Standard library

Standard library

A standard library for a programming language is the library that is conventionally made available in every implementation of that language. In some cases, the library is described directly in the programming language specification; in other cases, the contents of the standard library are determined by more informal social practices in the programming community.

Depending on the constructs made available by the host language, a standard library may include:
*subroutines
*macro definitions
*global variables
*class definitions
*templates,

Most standard libraries include definitions for at least the following commonly used facilities:
*algorithms (such as sorting algorithms)
*data structures (such lists, trees and hash tables)
*interaction with the host platform, including input/output and operating system calls

Philosophies

Philosophies of standard library design vary widely. For example, Bjarne Stroustrup, designer of C++, writes::"What ought to be in the standard C++ library? One ideal is for a programmer to be able to find every interesting, significant, and reasonably general class, function, template, etc., in a library. However, the question here is not, "What ought to be in "some" library?" but "What ought to be in the "standard" library?" The answer "Everything!" is a reasonable first approximation to an answer to the former question but not the latter. A standard library is something every implementer must supply so that every programmer can rely on it." [Bjarne Stroustrup. "The C++ Programming Language". 3rd Ed. Addison-Wesley, 1997] This suggests a relatively small standard library, containing only the constructs that "every programmer" might reasonably require when building a large collection of software. This is the philosophy that is used in the C and C++ standard libraries.

By contrast, Guido van Rossum, designer of Python, has embraced a much more inclusive vision of the standard library; in the Python tutorial, he writes::"Python has a "batteries included" philosophy. This is best seen through the sophisticated and robust capabilities of its larger packages. [Guido van Rossum. [http://docs.python.org/tut/node12.html#SECTION00121200000000000000000 Python Tutorial] ."] Van Rossum goes on to list libraries for processing XML, XML-RPC, email messages, and localization, facilities that the C++ standard library omits. This other philosophy is often found in Scripting languages (as in Python or Ruby) or languages that use a Virtual machine, such as Java or the .NET Framework languages.

Examples of standard libraries

* C standard library, for the C programming language
* C++ standard library, for the C++ programming language
* Standard Template Library (or STL), a sub-part of the C++ standard library
* Java Class Library (or JCL), for the Java programming language, and Java Platform
* Base Class Library (or BCL), for the .NET Framework

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • C standard library — The C Standard Library consists of a set of sections of the ANSI C standard in the programming language C. They describe a collection of headers and library routines used to implement common operations such as input/output[1] and string handling …   Wikipedia

  • C++ standard library — In C++, the Standard Library is a collection of classes and functions, which are written in the core language. The Standard Library provides several generic containers, functions to utilise and manipulate these containers, function objects,… …   Wikipedia

  • C Standard Library — Die Standard C Library ist eine genormte Bibliothek für die Programmiersprache C, die etwa 200 Funktionen enthält und in jedem hosted environment von C zu implementieren ist. Sie enthält häufig benötigte Funktionen für Ein und Ausgabe,… …   Deutsch Wikipedia

  • Apache C++ Standard Library — Infobox Software name = Apache C++ Standard Library caption = developer = Apache Software Foundation latest release version = 4.2.1 latest release date = release date|2008|5|1 latest preview version = latest preview date = operating system =… …   Wikipedia

  • C++ Standard Library — Bibliothèque standard du C++ La bibliothèque standard du C++ (C++ Standard Library en anglais) est une bibliothèque de classes et de fonctions standardisées pour le langage C++. Elle fournit un certain nombre de classes comme par exemple :… …   Wikipédia en Français

  • C++ standard library — Bibliothèque standard du C++ La bibliothèque standard du C++ (C++ Standard Library en anglais) est une bibliothèque de classes et de fonctions standardisées pour le langage C++. Elle fournit un certain nombre de classes comme par exemple :… …   Wikipédia en Français

  • C Plus Plus standard library — Bibliothèque standard du C++ La bibliothèque standard du C++ (C++ Standard Library en anglais) est une bibliothèque de classes et de fonctions standardisées pour le langage C++. Elle fournit un certain nombre de classes comme par exemple :… …   Wikipédia en Français

  • C plus plus standard library — Bibliothèque standard du C++ La bibliothèque standard du C++ (C++ Standard Library en anglais) est une bibliothèque de classes et de fonctions standardisées pour le langage C++. Elle fournit un certain nombre de classes comme par exemple :… …   Wikipédia en Français

  • System (C standard library) — In the C standard library, system is a function used to execute subprocesses and commands, residing in stdlib.h. It differs from the exec/spawn family of functions in that instead of passing arguments to an executed object, a single string is… …   Wikipedia

  • Qsort (C Standard Library) — In the C standard library, qsort is a function used to sort elements in an array.Prototype void qsort(void *base, size t nmemb, size t size,int(*compar)(const void*, const void*)); Behaviour The contents of the array are sorted in ascending order …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”