MiloMemory-safe. Native. Simple.
A compiled systems language with automatic memory management and no lifetime annotations.
A compiled systems language with automatic memory management and no lifetime annotations.
No null pointers. No dangling references. No data races. No buffer overflows. All caught before your code ever runs.
One ownership rule: references can't escape the function they're passed to. That's it.
Compiles to native code via LLVM. Sub-millisecond startup. Binaries under 300KB.
If you've written any typed language, you already know most of Milo. And so does your AI.
fn main(): i32 {
let names: Vec<string> = ["alice", "bob"]
let loud = names.map((n: &string) => n.toUpper())
print(loud.join(", "))
return 0
}No garbage collector. No manual memory management. The compiler tracks ownership and frees everything automatically.
fn printExtension(filename: &string): void {
let dot = filename.lastIndexOf(".")
print(filename[dot + 1..filename.len]) // zero-copy slice
}&string is a borrow. It can't outlive the data it points to. The compiler enforces this — no annotations needed.
from "std/http" import { Context, Router, serveRouter }
fn main(): i32 {
var r: Router = Router.new()
r.get("/", (ctx: &mut Context) => ctx.html("<h1>Hello!</h1>"))
r.get("/users/:id", (ctx: &mut Context) => {
let id = ctx.param("id")
return ctx.text(id)
})
serveRouter(8080, r)
return 0
}Router, path params, closures — a web server in 10 lines. No framework, no dependencies. This is the standard library.