Comparison matrices
Twelve widely used languages compared on the same rows across three matrices: language features, concurrency support, and interoperability and tooling. Each matrix is horizontally scrollable and keeps its metric column in view.
Language features¶
Rows describe the language and its standard library, not third-party packages.
| Metric | C | C++ | Java | C# | Go | Rust | Swift | Kotlin | Python | JavaScript | TypeScript | Haskell |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Identity | ||||||||||||
| First appeared | 1972 | 1985 | 1995 | 2000 | 2009 | 2010 | 2014 | 2011 | 1991 | 1995 | 2012 | 1990 |
| Type checking | Static | Static | Static | Static | Static | Static | Static | Static | Dynamic | Dynamic | Static | Static |
| Type inference | No | Partial | Partial | Partial | Partial | Yes | Yes | Yes | No | No | Yes | Yes |
| Memory model | Manual | RAII | GC | GC | GC | Own | ARC | GC | RC+GC | GC | GC | GC |
| Null in the type system | No | No | Partial | Yes | No | Yes | Yes | Yes | No | No | Yes | Yes |
| Data modelling | ||||||||||||
| Algebraic data types | No | Partial | Partial | Partial | No | Yes | Yes | Partial | Partial | No | Yes | Yes |
| Exhaustive pattern matching | No | Partial | Partial | Partial | No | Yes | Yes | Partial | Partial | No | Partial | Yes |
| Generics | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Partial | No | Yes | Yes |
| Abstraction | ||||||||||||
| Operator overloading | No | Yes | No | Yes | No | Yes | Yes | Yes | Yes | No | No | Yes |
| First-class closures | No | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Immutability by default | No | No | No | No | No | Yes | Partial | Partial | No | No | No | Yes |
| Compile-time metaprogramming | Partial | Yes | No | Partial | No | Yes | Yes | Partial | No | No | Partial | Yes |
Sources: language specifications and standard library documentation for each language's current stable release.
Concurrency¶
Concurrency facilities provided by the language or its standard library.
| Metric | C | C++ | Java | C# | Go | Rust | Swift | Kotlin | Python | JavaScript | TypeScript | Haskell |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Execution units | ||||||||||||
| OS threads exposed | Yes | Yes | Yes | Yes | Partial | Yes | Yes | Yes | Yes | No | No | Yes |
| Lightweight tasks | No | Partial | Yes | Yes | Yes | Yes | Yes | Yes | Partial | Yes | Yes | Yes |
| async / await | No | Yes | No | Yes | No | Yes | Yes | Yes | Yes | Yes | Yes | Partial |
| Coordination | ||||||||||||
| Channels in the standard library | No | No | Partial | Yes | Yes | Yes | Yes | Partial | Yes | No | No | Yes |
| Actor isolation in the language | No | No | No | No | No | No | Yes | No | No | No | No | No |
| Compiler-checked data-race safety | No | No | No | No | No | Yes | Yes | No | No | No | No | Partial |
| Runtime serialises user code | No | No | No | No | No | No | No | No | Yes | Yes | Yes | No |
Green, amber, and grey markers carry text labels so the table remains readable without colour.
Interoperability and tooling¶
Interoperability with existing native code, and the tooling shipped with the toolchain.
| Metric | C | C++ | Java | C# | Go | Rust | Swift | Kotlin | Python | JavaScript | TypeScript | Haskell |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Native interoperability | ||||||||||||
| C ABI, calling out | Yes | Yes | Partial | Partial | Yes | Yes | Yes | Partial | Yes | Partial | Partial | Yes |
| C ABI, callable from C | Yes | Yes | Partial | Partial | Yes | Yes | Yes | Partial | Partial | No | No | Yes |
| C++ interoperability | Partial | Yes | No | No | No | Partial | Yes | No | Partial | No | No | No |
| Stable binary interface | Yes | No | Yes | Yes | No | No | Yes | No | No | No | No | No |
| Shipped tooling | ||||||||||||
| Official package manager | No | Partial | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
| Official formatter | No | No | No | Yes | Yes | Yes | Yes | Yes | No | No | No | No |
| Official language server | No | Partial | Partial | Yes | Yes | Yes | Yes | Yes | Partial | Partial | Yes | Partial |
| REPL in the toolchain | No | Partial | Yes | Yes | No | No | Yes | Yes | Yes | Yes | Partial | Yes |
“Official” means maintained by the same organisation or working group as the compiler.
What has moved¶
The matrices describe current stable releases. This is what that qualification is worth over six years.
Caveats¶
Versions move
Feature rows reflect the current stable release. Several cells that read No a decade ago now read Yes — generics in Go, pattern matching in Java and Python, nullability in C#.
Implementations differ
Rows describe the reference implementation. Python's global interpreter lock is a CPython property, not a language requirement, and recent CPython releases make it optional.
Feature counts are not scores
Totalling the Yes cells produces a number with no meaning. C's short row reflects a deliberately small language that has outlasted most of its replacements.