Difference between revisions of "Standard library"
Karl Jones (Talk | contribs) (→Description) |
Karl Jones (Talk | contribs) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 13: | Line 13: | ||
== Java == | == Java == | ||
− | Some languages are designed so that the meanings of certain syntactic constructs cannot even be described without referring to the core library. For example, in [[Java (programming language|Java]], a [[string literal]] is defined as an instance of the java.lang.String class. | + | Some languages are designed so that the meanings of certain syntactic constructs cannot even be described without referring to the core library. For example, in [[Java (programming language)|Java]], a [[String (computer science)|string literal]] is defined as an instance of the <code>java.lang.String class</code>. |
== Smalltalk == | == Smalltalk == | ||
− | Similarly, in Smalltalk, an anonymous function expression (a "block") constructs an instance of the library's BlockContext class. | + | Similarly, in Smalltalk, an anonymous function expression (a "block") constructs an instance of the library's <code>BlockContext</code> class. |
− | + | == Scheme == | |
Conversely, Scheme contains multiple coherent subsets that suffice to construct the rest of the language as library macros, and so the language designers do not even bother to say which portions of the language must be implemented as language constructs, and which must be implemented as parts of a library. | Conversely, Scheme contains multiple coherent subsets that suffice to construct the rest of the language as library macros, and so the language designers do not even bother to say which portions of the language must be implemented as language constructs, and which must be implemented as parts of a library. | ||
Line 32: | Line 32: | ||
* [https://en.wikipedia.org/wiki/Standard_library Standard library] @ Wikipedia | * [https://en.wikipedia.org/wiki/Standard_library Standard library] @ Wikipedia | ||
+ | |||
+ | |||
+ | [[Category:Computer programming]] | ||
+ | [[Category:Computer science]] | ||
+ | [[Category:Software]] | ||
+ | [[Category:Software development]] |
Latest revision as of 12:50, 11 September 2016
In computer programming, a standard library is the library made available across implementations of a programming language.
Description
These libraries are conventionally described in programming language specifications; however, contents of a language's associated library may also be determined (in part or whole) by more informal practices of a language's community.
A language's standard library is often treated as part of the language by its users, although the designers may have treated it as a separate entity.
Many language specifications define a core set that must be made available in all implementations, in addition to other portions which may be optionally implemented.
The line between a language and its libraries therefore differ from language to language.
Java
Some languages are designed so that the meanings of certain syntactic constructs cannot even be described without referring to the core library. For example, in Java, a string literal is defined as an instance of the java.lang.String class
.
Smalltalk
Similarly, in Smalltalk, an anonymous function expression (a "block") constructs an instance of the library's BlockContext
class.
Scheme
Conversely, Scheme contains multiple coherent subsets that suffice to construct the rest of the language as library macros, and so the language designers do not even bother to say which portions of the language must be implemented as language constructs, and which must be implemented as parts of a library.
See also
External links
- Standard library @ Wikipedia