Well, actually very many computer languages are written in C and or C++.
Nowadays
Rust
Currently #10 on the Tiobe index list
is a strong newcomer, fast as C and C++ but with very much (memory) checking
built in which is a weak spot in C and C++.
E.g. part of the Linux kernel is now re-written or written in Rust instead of e.g. C.
Even Linus Torvalds uses it now.
Rust is widely recognized as the most loved programming language by developers, capturing the highest developer satisfaction and admiration ratings in annual community evaluations for consecutive years).
But Rust has a high learning curve.
Note: TSE 4.50.30 has already Rust syntax highlight (e.g. .rs file extensions) included.
===
Major programming languages whose reference implementations, compilers, or interpreters are written in C include:
- Python: The reference implementation, CPython, is written entirely in C.
- PHP: The core engine that powers PHP, known as the Zend Engine, is written in C.
- JavaScript: Popular JavaScript engines like Google Chrome's V8 Engine are written in C++ (an extension of C), but older standard implementations and engine components heavily rely on C.
- Perl: The official interpreter for Perl is written in C.
- Ruby: The original and dominant implementation of Ruby (MRI or CRuby) is written in C.
- Lua: A lightweight scripting language designed to be embedded into applications, written completely in clean ANSI C.
- R: The primary environment and interpreter for the R data science language is written primarily in C and Fortran.
- MATLAB: The underlying computational core of MATLAB is primarily built using C and C++. [1, 2]
Note on Compiled Languages: Many modern compiled languages like Java, Go, and Rust originally had their very first compilers written in C. Once they became functional, they underwent a process called "bootstrapping," meaning their current compilers are now written in the languages themselves (e.g., the official Rust compiler is now written in Rust). [2]
Are you asking out of curiosity about compiler design, or are you looking for a language that easily interoperates with C libraries?
===
Many major programming languages are written in C++ because their primary interpreters, compilers, or runtime engines rely on its high performance and low-level memory control. [1, 2]
The primary languages whose standard or major implementations are written in C++ include:
- Java: The primary HotSpot JVM (Java Virtual Machine) developed by Oracle/Sun is written in C++. [3]
- JavaScript: Google Chrome's V8 engine, Node.js, and Mozilla Firefox's SpiderMonkey engine are all written in C++ to compile and execute JavaScript code quickly. [2, 4]
- Python: While the standard CPython interpreter is written in C, major machine learning libraries that power modern Python—such as TensorFlow and PyTorch—are written heavily in C++ under the hood. [3, 4]
- C#: The official .NET Core CLR (Common Language Runtime) runtime engine is written primarily in C++.
- PHP: While the core Zend Engine is written in C, Facebook's HHVM (HipHop Virtual Machine), which executes PHP and Hack code, is written in C++. [3]
- Ruby: The JRuby implementation can run on the C++-based JVM, and various alternative performance engines for Ruby utilize C++.
Additionally, modern compilers for C and C++ themselves (such as Clang and recent versions of GCC) are written in C++. [5]
Would you like to know more about how a specific language's compiler or virtual machine functions, or are you looking to understand how to write extensions for these languages using C++?