# C++

> Compiled language that adds classes, templates and manual memory control to C.

- **Appeared:** 1985
- **Creators:** Bjarne Stroustrup
- **Type:** systems
- **Status:** alive
- **Born from:** In 1979 Bjarne Stroustrup was using Simula, which had the classes he wanted, to simulate a distributed operating system. Simula ran too slowly for the job, so he set out to combine its classes with the speed of C, and the first version was called C with Classes.
- **Reacts to:** c, simula
- **Trade-offs:** manual memory; static types; compiles to native code; concurrency: threads. Cost: A large language that keeps C's undefined behaviour and offers many ways to misuse the same feature, and template-heavy code gives long compile times and error messages.
- **Slots:** systems ●●● strong; games ●●● strong; embedded ●●○ ok; server ●●○ ok; wasm ●●○ ok; browser ○○○ none (Chrome's JavaScript engine is C++, but pages reach C++ only through WebAssembly.)
- **Alternatives:** rust, c, zig
- **Won where:** V8, the JavaScript engine used in Chrome and Node.js, is written in C++ [source](https://v8.dev/docs); LLVM, the compiler framework, is written in the subset of C++ its coding standards define [source](https://llvm.org/docs/GettingStarted.html)
- **Timeline:** 1979: Work on C with Classes begins, the first version of C++ [source](https://softwarepreservation.computerhistory.org/c_plus_plus/); 1984: The name C++ is adopted [source](https://softwarepreservation.computerhistory.org/c_plus_plus/); 1985: Cfront 1.0, the first commercial release of C++ [source](https://softwarepreservation.computerhistory.org/c_plus_plus/); 1998: ISO/IEC 14882:1998, the first ISO C++ standard, is published on 1 September 1998 [source](https://www.stroustrup.com/iso_pressrelease2.html); 2023: Technical work on C++23 is completed; the standard is published as ISO/IEC 14882:2024 [source](https://isocpp.org/std/the-standard)
- **Links:** [website](https://isocpp.org/)
- **PLDB:** https://pldb.io/concepts/cpp.html
- **Sources:** https://www.stroustrup.com/bs_faq.html, https://stroustrup.com/gillies.htm, https://softwarepreservation.computerhistory.org/c_plus_plus/, https://www.stroustrup.com/iso_pressrelease2.html, https://isocpp.org/std/the-standard, https://v8.dev/docs, https://llvm.org/docs/GettingStarted.html, https://pldb.io/concepts/cpp.html
- **Verified:** no, draft of 2026-10-30
- **Canonical:** https://langwhy.dev/lang/cpp/

## Why it exists

In 1979 Bjarne Stroustrup started the work that became C++, with the goal of writing "efficient systems programs in the styles encouraged by Simula67" ([Stroustrup, C++ FAQ](https://www.stroustrup.com/bs_faq.html)). He was using Simula to simulate a distributed operating system. In a lecture transcript on his site he says Simula "simply ran too slow", and that "it was too expensive, so I had to translate it to a lower level language" ([Stroustrup, Gillies lecture](https://stroustrup.com/gillies.htm)). He wanted Simula's type system and object-oriented design married to the strengths of C. The first version, "C with Classes", began in April 1979 ([Computer History Museum](https://softwarepreservation.computerhistory.org/c_plus_plus/)).

## What it trades away

C++ kept C's unchecked pointers and undefined behaviour, because Stroustrup considered C "the best systems programming language available" at the time ([Stroustrup, C++ FAQ](https://www.stroustrup.com/bs_faq.html)). On top of that it adds classes, templates, operator overloading and many more features, so a programmer has many ways to use the language and many ways to misuse it. Heavy template code makes compile times and error messages long. The cost is size and complexity, paid by everyone who reads the code, and the unsafe parts stay in the language for compatibility with C.

## Where it won

V8, Google's JavaScript and WebAssembly engine, is written in C++ and is used in Chrome and Node.js ([V8](https://v8.dev/docs)). LLVM, the compiler framework, is written using the subset of C++ documented in its coding standards ([LLVM](https://llvm.org/docs/GettingStarted.html)). The language became an ISO standard when ISO/IEC 14882:1998 was published on 1 September 1998 ([Stroustrup, ISO press release](https://www.stroustrup.com/iso_pressrelease2.html)), and the current standard, C++23, finished its technical work in 2023 ([ISO C++](https://isocpp.org/std/the-standard)).

---
Data: CC0, https://github.com/langwhy/langwhy/blob/main/data/languages/cpp.yaml
