Simple syntax
Readable syntax inspired by modern scripting languages.
Tekst is a lightweight programming language with clean, readable syntax designed for learning, experimentation, and building useful things.
fn greet(name):
print("Hello, " + name)
greet("World")
Tekst takes inspiration from languages like Python while keeping its own identity. The goal is simple: make code easy to read, easy to write, and fun to experiment with.
The interpreter is written in C++17 and processes Tekst source code through a lexer, parser, and interpreter.
A compact language doesn't have to be a limited one.
Readable syntax inspired by modern scripting languages.
Work naturally with integers, doubles, strings, lists, and dictionaries.
Create reusable functions with parameters and default arguments.
Use classes, constructors, methods, and inheritance.
Use conditions, while loops, and for-in iteration naturally.
Handle runtime problems using try and catch blocks.
Tekst keeps common programming concepts recognizable while giving them a compact syntax.
x = 42
name = "Tekst"
active = True
numbers = [1, 2, 3, 4, 5]
fn add(a, b):
print(a + b)
add(5, 3)
class Counter:
def __init__(self, start):
self.value = start
def increment():
self.value = self.value + 1
x = 10
if x > 15:
print("Large")
elif x > 5:
print("Medium")
else:
print("Small")
Start small. Build something interesting. Then make it unnecessarily complicated. It's tradition.
print("Hello, World!")
numbers = [1, 2, 3, 4, 5]
for num in numbers:
print(num * 2)
fn multiply(a, b):
print(a * b)
multiply(3, 7)
Tekst uses a straightforward interpreter pipeline.
Turns source text into tokens.
Builds an abstract syntax tree.
Evaluates the AST at runtime.
Download the latest Tekst build and start writing.
Windows · x64
Read the documentation and start writing Tekst.
Read the docs →