Core C++

8. The standard library🔗

The headers of Core C++ declare the entities of the library without a body, the class templates std::vector and std::function and the function assert. Each declaration names an intrinsic, a set of judgments in natural semantics that the rules of the language use as premises.

The intrinsics live in CoreCpp/Std/, apart from the type checker and the evaluator, which know no intrinsic by name. A use of an undeclared entity is a type error, so a program uses the library only through its #include.

Nothing of this is built into the syntax. The grammar has no production and the lexer no reserved word for the library, namespace std is an ordinary namespace and std::vector an ordinary qualified name, and what tells a class of the library from one of the program is the case of its name, lowercase for the first and uppercase for the second.

  1. 8.1. Interface
  2. 8.2. Headers