Introducing Strata
12/29/2025Introducing Strata
For the past few months, I've been quietly working on a new programming language called Strata.
If you've been following my work, you know I'm driven by a passion for creating better tools. From building The Formidable Framework, a full-stack Node.js framework inspired by Laravel. To creating LunaQL, a realtime NoSQL database. These projects have been labors of love, and I'm still actively working on and cherishing them.
But Strata is different. It feels like the culmination of everything I've learned and everything I want to give back to the community. I'm pouring my heart into this one, treating it as my most ambitious project yet.
What is Strata?
Strata is a strongly typed programming language designed to bring safety, correctness, and modern tooling to the PHP world. It's not just "syntax sugar", it's a full language with its own compiler and runtime capabilities. Well, kinda.
Crucially, Strata isn't trying to replace PHP. It's designed to be a companion, working seamlessly alongside your existing code, allowing you to adopt it incrementally where safety matters most.
⚠️ Disclaimer: Strata is currently miles away from release. It is in a very early, experimental stage. Everything I'm showing here is subject to change.
A Quick Look
Here's what "Hello World" looks like in Strata:
fn main(): Void {
print("Hello, Strata!");
}
And a simple User class:
class User(name: String, email: String) {
public fn greet(): String {
return "Hello ${this.name}";
}
}
fn main(): Void {
let user = User(name: "Donald", email: "donald@example.com");
print(user.greet());
}
Notice the named arguments? In Strata, they are required. User(name: "...", email: "..."), not User("...", "..."). This makes code much more readable and refactor-safe.
No Null, Just Options
Strata doesn't have null. Instead, we use the Option type, which can either be Some(value) or None. This forces you to handle the "missing" case explicitly.
fn findUser(email: String): Option<User> {
let users = [
User(name: "Donald", email: "donald@example.com"),
User(name: "Luna", email: "luna@example.com")
];
let user = array_find(users, (user): User => user.email == email);
return user ? Some(user) : None;
}
fn main(): Void {
let user = findUser(email: "donald@example.com");
match user {
Some(u) => print("Found: ${u.name}"),
None => print("User not found")
}
}
You could also do this:
fn main(): Void {
let user = findUser(email: "donald@example.com");
if user is Some {
print("Found: ${user.value.name}");
} else {
print("User not found");
}
}
However, if you are certain that a value exists, you can skip the safety checks and unwrap it directly:
fn main(): Void {
let user = findUser(email: "donald@example.com");
// Use only when certain!
print("Found: ${user.unwrap().name}");
}
Unreachable Code Analysis
The compiler is smart enough to know when code will never run. It doesn't just warn you; it can stop you from writing dead code.
fn demo(): String {
return "Hello";
// Compiler Error: This code is unreachable
print("I will never run 😢");
}
Unstoppable Error Handling
For operations that might fail (like I/O or math), Strata uses the Result type. It's similar to Option, but it carries an error value when things go wrong.
fn divide(a: Int, b: Int): Result<Int, DivisionByZeroError> {
if b == 0 {
return Err(DivisionByZeroError("Cannot divide by zero"));
}
return Ok(a / b);
}
fn main(): Void {
let results = divide(a: 84, b: 0);
try {
print results.value;
} catch (e: DivisionByZeroError) {
// Do something with the error
}
}
Tooling
I believe that a great developer experience starts with great tooling. That's why I'm building a VS Code extension to accompany the language from day one. Here's a sneak peek:
What's Next?
There is still a lot of work to be done. I am nowhere near completion. Not even sure if I'm ready for alpha yet. There's still a lot of features to be added and a lot of bugs to be fixed. For now, we only have a basic compiler and a few basic features.
For more information
You can look at the documentation here.
And if you'd like to help out, lets connect: donaldpakkies@gmail.com