TPPL is a working but deliberately small alpha. It compiles a useful typed subset end to end, but it does not yet cover every competitive-programming problem.
01
Available end to end
Implemented from .tpp source through generated C++20 and g++.
Scalar types and recursive vector<T>
Top-level functions and recursion
Initialized locals, expressions and assignments
if/else, while, ranges and for-each
Strings, chars, checked indexing and runtime I/O
02
Frontend only
Parsed and semantically checked, but not emitted by the C++ backend.
Global variables
Nested functions
Uninitialized local variables
03
Not implemented
Not part of the current language. No release date is promised.
Structs, records or classes
Enums or sum types
Fixed arrays, maps and sets
A broader standard algorithm library
Current boundary:vector<T> is TPPL's only composite container, and user-defined data types are not available yet.
The language, first
Contest-shaped by design.
Functions, vectors, ranges and output stay direct. The syntax remains familiar, while the compiler handles the semantic work before C++ is emitted.
solution.tpp
intsquare(int x) {
return x * x;
}
intmain() {
vector<int> answers =vector<int>(5, 0);
for i in0..5 {
answers[i] =square(i +1);
}
for answer in answers {
print(answer);
}
return0;
}
output
1
4
9
16
25
Same problem. Less ceremony.
Keep the algorithm in view.
Read n. Visit [0, n). Print the even values. Both programs do exactly that.
Traditional contest C++C++20
solution.cpp
#include <cstdint>#include <iostream>intmain() {
std::int64_t n =0;
std::cin >> n;
for (std::int64_t i =0; i < n; ++i) {
if (i %2==0) {
std::cout << i <<'\n';
}
}
}
vs
The same solution in TPPL.tpp
solution.tpp
intmain() {
int n =read_int();
for i in0..n {
if i %2==0 {
print(i);
}
}
return0;
}
Why TPPL?
Performance includes your time.
01
Problem first
Spend fewer keystrokes on ceremony and more attention on the algorithm.
02
Contest-first
Functions, control flow, vectors and I/O are shaped around the work of solving.
03
C++20 underneath
A real frontend checks your program, lowers it to typed IR and emits C++20 for g++.
Language showcase
Small pieces. Useful together.
Version 0.01 Alpha focuses on a compact, typed subset that already reaches executable C++20.
01
Available end to end
Functions & strings
Pass values directly, return strings, and use resolved string operations.