Skip to content

Concept Count

How much do you need to learn to read arbitrary code in this language?

Two views: the language's total surface area (everything a developer might encounter), and how many concepts a typical solution actually uses.

Surface Area — Total Concepts

The full inventory of distinct ideas a developer must learn. Curated across 8 categories: types, control flow, functions, OOP/data, memory, concurrency, metaprogramming, and error handling. Each concept warrants its own section in a language tutorial.

Language Concepts Keywords Keyword Ratio
Objective-C48571.19
Milo49300.61
Erlang55280.51
Go58250.43
C60440.73
Elixir62150.24
Clojure65160.25
JavaScript65460.71
Ruby65410.63
Zig65490.75
Haskell75240.32
Python75390.52
Java80680.85
Kotlin85780.92
TypeScript100670.67
Rust110580.53
Swift110980.89
C#1201180.98
C++135920.68

Keyword ratio = keywords / concepts. High ratio (Zig 0.75) means most concepts have dedicated syntax. Low ratio (Haskell 0.32) means concepts live in the type system, not reserved words.

Concept Distribution

Same total can mean very different things. Where do each language's concepts live?

LanguageTypesControlFunctionsOOP/DataMemoryConcurrencyMetaprogErrors
Objective-C864108453
Milo865481044
Erlang688421566
Go1086851038
C1286415564
Elixir88104214106
Clojure86146212125
JavaScript681210210107
Ruby610101425126
Zig12106515557
Haskell22815328512
Python8101018210125
Java141081841088
Kotlin16101214310812
TypeScript221012142101416
Rust2212121222101010
Swift2012121612121412
C#201212206122216
C++2512152220121811

Concepts Used Per Solution

How many concepts does a typical program actually exercise? Averaged across 7 benchmark problems. This measures what you need to write code, not what you need to read arbitrary code (that's surface area above).

Language Concepts Used Keywords Used Syntax Patterns
Clojure541
Erlang523
Objective-C651
Ruby6.43.43
Elixir7.343.3
C#871
JavaScript8.971.9
Python9.37.32
C++9.46.62.9
TypeScript10.17.42.7
Kotlin10.373.3
C11.17.14
Go11.68.92.7
Swift11.792.7
Haskell12.184.1
Rust14.19.94.3
Java14.710.34.4
Milo16.412.14.3
Zig2015.94.1

What drives the differences?

C++ (135) is the outlier — templates, SFINAE, move semantics, rule of five, coroutines, modules, concepts, ranges. The full surface area that makes C++ notoriously difficult to master.

Haskell (75) vs Python (75) — same total, opposite shapes. Python's concepts live in OOP & metaprogramming (classes, decorators, metaclasses). Haskell's live in types & functions (typeclasses, monads, higher-kinded types).

Go (58) — deliberately minimal. 25 keywords, no generics until recently, no exceptions, no inheritance. The language bets that a small surface area makes codebases more readable across large teams.

Zig (65) — similar to C's size but adds comptime, optional types, and safety checks. The low concept count is intentional — Zig's design philosophy rejects hidden control flow and implicit behavior.

Elixir (62) vs Erlang (55) — Elixir adds macros, protocols, and comprehensions on top of Erlang's model, trading a larger surface area for more expressiveness.

What counts as a concept?

A concept is a distinct mental model the programmer must hold — not syntax, but semantics:

  • if/else = 1 concept (conditional flow)
  • Ownership + borrowing = 2 concepts (they interact but are distinct)
  • Generics = 1 concept (regardless of instantiation count)
  • async/await = 1 concept, but async + lifetimes = a compound interaction

Keywords are reserved words from the language spec. Syntax patterns are structural features detected in code (closures, pattern matching, generics, channels, etc.). Concept count per solution = keywords used + syntax patterns detected.

Surface area is a static language property — curated by analyzing each language's specification, standard library, and common idioms. See methodology for full details and per-language notes.