A strongly and statically typed language
for building reliable software.
Strata's compiler catches bugs at compile time through deep static analysis. Type safety and null safety are guaranteed. No implicit conversions, no runtime surprises.
Why Strata?
Correctness
Strata's type system and null safety eliminate entire classes of bugs before your code ever runs.
fn getUser(id: Int): Option<User> {
if id <= 0 {
return None;
}
return Some(User(id: id));
}
fn main(): Void {
// compiler forces you to handle all cases
match getUser(id: -1) {
Some(u) => print("Found: ${u.name}"),
None => print("User not found"),
}
}Productivity
Strata features comprehensive documentation, clear compiler errors, and powerful tooling: an integrated Language Server with auto-completion, type inspections, instant diagnostics, and seamless refactoring.
fn createUser(name: String, age: Int): User {
return User(name: name, age: age);
}
fn main(): Void {
// named arguments with intelligent suggestions
let user = createUser(name: "Alice", age: 30);
// Error: Type 'String' is not assignable to type 'Int'
// let invalid = createUser(name: "Bob", age: "thirty");
}Performance
Strata compiles to standard, optimized PHP code files. It can run standalone using the internal runtime, or deploy to any standard PHP environment. No system dependencies required.
// compiles to native PHP classes with typed properties
readonly class Point {
public constructor(
public x: Float,
public y: Float
) {}
}Build Anything
From powerful command-line tools and high-performance web applications to vibrant desktop GUIs, Strata delivers the type safety and tooling you need to ship reliable, production-ready software.
fn main(): Void {
match parseArgs() {
Ok(config) => {
let result = run(config: config);
print("Successfully finished with: ${result}");
},
Err(e) => {
print("Error: ${e}");
exit(1);
}
};
print("Done.");
}import Illuminate.Support.Facades.Route;
import Illuminate.Support.Facades.JsonResponse;
Route::post(uri: "/users", action: (request) => {
match createUser(request: request) {
Ok(user) => {
return JsonResponse(data: user, status: 201);
},
Err(e) => {
return JsonResponse(data: e, status: 500);
}
}
});import Strata.Gtk.App;
fn main(): Void {
let app = App(options: [ 'builder_only' => false ]);
app.onStartup(handler: (app: App) => {
let window = app.window();
window.title(title: 'Hello World');
window.defaultSize(width: 480, height: 240);
window.child(child: app.label(text: 'Hello World'));
window.show();
});
app.run();
}fn main(): Void {
match parseArgs() {
Ok(config) => {
let result = run(config: config);
print("Successfully finished with: ${result}");
},
Err(e) => {
print("Error: ${e}");
exit(1);
}
};
print("Done.");
}import Illuminate.Support.Facades.Route;
import Illuminate.Support.Facades.JsonResponse;
Route::post(uri: "/users", action: (request) => {
match createUser(request: request) {
Ok(user) => {
return JsonResponse(data: user, status: 201);
},
Err(e) => {
return JsonResponse(data: e, status: 500);
}
}
});import Strata.Gtk.App;
fn main(): Void {
let app = App(options: [ 'builder_only' => false ]);
app.onStartup(handler: (app: App) => {
let window = app.window();
window.title(title: 'Hello World');
window.defaultSize(width: 480, height: 240);
window.child(child: app.label(text: 'Hello World'));
window.show();
});
app.run();
}