Introduction
Introduction
PekoScript is a statically typed, compiled language. Source files use the
.peko extension and compile through LLVM to native binaries for macOS,
Windows, Linux, iOS, and Android.
Three properties shape most of the language:
- Every value has a type known at compile time. There is no dynamic typing and no runtime type juggling.
- Memory is managed by a garbage collector. There is no manual free, and no ownership or borrow system to satisfy.
- Generics are erased. A generic body compiles once and dispatches through a witness table rather than being stamped out per type argument.
A small program:
import std::io;
fn on_start() {
let name = "world"
io::println(`hello, ${name}`)
}Reading this reference
This book covers the language itself: syntax, types, and semantics. The peko
command, the standard library API, and the platform are documented separately.
Examples are drawn from the shipped standard library, so they reflect the way the language is actually written rather than an idealized style.