11l
A compiled, statically typed language that bridges Python readability with C++ performance through transpilation, featuring a unique hierarchical keyword tree with exactly 11 root keywords.
Created by Alexander Tretyak
11l (pronounced “elevenel”) is a compiled, statically typed programming language created by Alexander Tretyak that aims to combine Python’s readability with C++ performance. The language transpiles to C++, producing native machine code while offering a concise, low-noise syntax. Its most distinctive feature is a hierarchical keyword tree containing exactly 11 root keywords, each abbreviable to a single letter – the origin of its name.
History & Origins
11l emerged around 2018 when Alexander Tretyak began developing a language that could bridge the gap between Python’s developer-friendly syntax and C++’s execution speed. The project was motivated by a common frustration: Python is pleasant to write but slow to execute, while C++ is fast but verbose and complex.
Design Goals
From the outset, 11l aimed to follow a zero-overhead principle similar to C++: language features that you don’t use should not impose runtime costs. At the same time, the language strives to feel as natural as a dynamically typed language through pervasive type inference, minimizing the annotation burden typically associated with static typing.
The name “11l” derives from the language’s 11 root keywords. The “l” may be read as standing for Latin litterae, Greek logos (meaning “word”), or English letters, because each root keyword can be abbreviated to a single letter. The creator also notes that 11l can stand for “Intelligent Infinity language.”
Evolution
Development has been steady and continuous since 2018, with the transpiler repository accumulating over 1,188 commits. The language was first published on PyPI in 2018, with the latest release (2021.3) in 2021. A notable milestone came when 11l implementations were completed for over 1,000 tasks on Rosetta Code, placing it among the top 30 most-represented languages on that platform – a remarkable achievement for a solo-developed language.
Design Philosophy
11l embodies a philosophy of maximum conciseness without sacrificing readability. The language eliminates what it considers visual noise in programming: mandatory semicolons, required parentheses around conditions, and excessive punctuation.
The Hierarchical Keyword Tree
The language’s defining innovation is organizing all keywords into a tree structure rather than a flat list. There are exactly 11 root keywords:
| Short | Long | Purpose |
|---|---|---|
C | in | Container membership |
I | if | Conditional |
E | else | Alternative branch |
F | fn | Function definition |
L | loop | Iteration |
N | null | Null value |
R | return | Return from function |
S | switch | Pattern matching |
T | type | Type definition |
V | var | Variable declaration |
X | exception | Error handling |
Each root keyword branches into sub-keywords using dot notation. For example, L.break exits a loop, L.index accesses the current iteration index, T.enum defines an enumeration, and X.try/X.catch handle exceptions. This hierarchical approach keeps the global keyword count small while providing rich functionality.
Dual Block Syntax
11l supports both indentation-based blocks (Python-style) and curly-brace blocks (C-style), and allows mixing them freely:
// Indentation style
F sum(a, b)
R a + b
// Curly brace style
F sum(a, b) {R a + b}
// Mixed style
F sum(a, b) {
R a + b
}
Key Features
Transpilation to C++
11l compiles source code into human-readable C++, which is then compiled to native machine code by a standard C++ compiler. The intermediate C++ output is designed to be readable, aiding debugging and understanding of the compilation process. This approach yields performance comparable to hand-written C++ – a benchmark on Project Euler problem #91 showed approximately 500x speedup over CPython, though typical speedups vary by workload.
Advanced Lexical Analyzer
The creator describes 11l’s lexer as “the most advanced lexical analyzer among all existing programming languages.” It enables semicolon-free grammar through three implied line-joining rules: binary operators at the end of a line, binary operators at the start of the next line, and unclosed brackets. This means multi-line expressions work naturally without explicit continuation characters.
Type System
11l uses static, strong typing with pervasive type inference. In practice, explicit type annotations are rarely needed:
V name = 'Alice' // type inferred as String
-V pi = 3.14159 // immutable constant (Float)
V (row, col) = get_pos() // tuple unpacking with inference
V? optional_val = N // nullable type
Built-in types include integers of various widths (Int, Int8, Int16, Int32, Int64), floating point numbers (Float, Float32, Float64), BigInt, Char, String, and collection types (Array, Tuple, Dict, Set, Deque).
Unique String Concatenation
The + operator cannot be used for string concatenation in 11l. Instead, the language uses juxtaposition – placing values next to each other:
V s1 = 'hello'
print(s1' world') // variable next to literal
print("id="id) // literal next to variable
Two-Tier Exception Handling
11l implements two distinct kinds of exceptions:
- First kind (non-fatal): Compile-time checked, implemented as extra return values, similar to Rust’s
Resulttype or Swift’s error handling. These are lightweight and have minimal overhead. - Second kind (fatal): Runtime exceptions similar to C++ or Python, using
X.try/X.catchsyntax. These are reserved for truly exceptional situations.
Unconventional Operators
11l makes several deliberate departures from conventional operator syntax:
&for logical AND (not bitwise), since logical AND is needed far more often[&]for bitwise AND,[|]for bitwise OR(+)for bitwise XOR (resembling the mathematical XOR symbol)I/for integer division,..for inclusive ranges,.<for exclusive ranges
Code Examples
Hello World
print('Hello, World!')
FizzBuzz
L(i) 1..100
I i % 15 == 0
print('FizzBuzz')
E I i % 3 == 0
print('Fizz')
E I i % 5 == 0
print('Buzz')
E
print(i)
Fibonacci
F fib(n)
I n < 2
R n
V prev = 1
V curr = 1
L 2 .< n
(prev, curr) = (curr, curr + prev)
R curr
Loop Varieties
L // infinite loop
L <condition> // while loop
L 3 // repeat 3 times
L 1..10 // range loop (inclusive)
L(x) [1, 2, 3] // for-each loop
Implementation
The reference implementation consists of two transpiler stages:
- Python to 11l – translates a subset of Python source code into 11l
- 11l to C++ – translates 11l source code into C++
Both stages produce human-readable output. The supported Python subset includes standard library modules such as math, os, time, re, random, and collections, though it does not support yield, multiple initialization (a = b = 0), or Python modules depending on C extensions.
11l’s own standard library includes modules for file system operations (fs), regular expressions (re), date/time handling (time), random numbers (random), heap data structures (minheap/maxheap), and CSV processing (csv).
The language is available via PyPI (pip install 11l) and as a direct download from the official website. It officially supports Linux and Windows.
Memory Management
11l does not use garbage collection. Since it transpiles to C++, memory management follows the C++ model, relying on stack allocation and RAII (Resource Acquisition Is Initialization) patterns. This gives developers deterministic resource cleanup without the unpredictable pauses associated with garbage collectors.
11l Today
11l remains an actively developed solo project. Alexander Tretyak continues to maintain and extend the transpiler, with the most recent commits in early 2026. The language’s most visible contribution to the broader programming community is its extensive presence on Rosetta Code, where over 1,000 task implementations demonstrate its expressiveness across a wide range of programming problems.
While the community remains small – the main transpiler repository has a modest number of GitHub stars – the language represents a thoughtful and sustained exploration of programming language design. Its task-driven development philosophy means the transpiler is extended based on concrete problems that need solving rather than attempting to cover every possible use case upfront.
Why 11l Matters
11l is a compelling example of how a single developer can create a practical, well-designed programming language. It tackles a real problem – the gap between expressive high-level languages and performant compiled languages – with an original approach. The hierarchical keyword tree is a genuinely novel idea in language design, and the dual syntax support (indentation and braces) offers flexibility rarely seen in other languages.
For Python developers who need C++ performance without wanting to write C++, the Python-to-11l-to-C++ pipeline offers an intriguing path. And for anyone interested in programming language design, 11l demonstrates that there is still room for fresh thinking about how we express computation.
Timeline
Notable Uses & Legacy
Rosetta Code
Over 1,000 programming tasks implemented in 11l, making it one of the most represented languages on the platform and serving as a comprehensive showcase of the language's capabilities.
Python-to-C++ Compilation
The 11l transpiler can compile a subset of Python directly to C++ via 11l as an intermediate representation, enabling dramatic performance improvements for compatible Python programs.
Project Euler Solutions
Benchmarked solving Project Euler problem #91 at approximately 500x faster than CPython, demonstrating the practical benefits of transpilation to native code for compute-intensive tasks.