The five ideas Wolang is built around
Most of Wolang is borrowed from languages that got it right. Five parts are not: effects in function signatures, units of measure in the type system, data layout that belongs to the storage, state machines as language constructs, and reactive derived values. Here is each one with code, and the problem it solves in a game.

Most of Wolang is deliberately unoriginal. Abilities (traits), generics, exhaustive match, comptime, optionals and typed errors come from languages that already got them right, and we saw no reason to be clever there.
Five parts are different, and they are the reason the language exists. Each one started as a bug or a workaround that kept showing up in game code.
1. Effects: a signature says what a function may do
need std.io.{Print}
need std.random.{RandomNew}
fun Pure(a: int, b: int) -> int => a * b + 1
fun Noisy(seed: u64) -> int uses io, unsafe {
var rng = RandomNew(seed)
const held = rng.Between(1, 6)
Print("rolled {held}")
return held
}
fun main() uses io, unsafe {
Print("{Pure(6, 7)}")
const _held = Noisy(42)
}The effects are io, alloc, rand, time, net, gpu, unsafe and panic. A function that calls something with an effect must declare it too, and the compiler checks this across the whole call graph.
That sounds academic until you notice how many game-programming rules are really effect rules:
- "This runs every frame and must not allocate": a function without
alloc. - "Gameplay simulation must be deterministic for lockstep and replays": no
randortimeexcept through the simulation's own seed and clock. - "A mod may not touch the file system or the network": the host grants a mod its capabilities, and the mod's manifest can only narrow them.
- "This must be computable at compile time":
comptimecode cannot have effects that only exist at run time.
One mechanism, four guarantees that used to be code-review comments.
2. Units and dimensions in the type system
need std.io.{Print}
dimension Length
dimension Time
unit m: Length
unit s: Time
fun main() uses io {
const distance = 100m
const taken = 9.58s
const speed = distance / taken
Print("{speed}")
}speed has the type Length / Time, and the compiler knows it. Adding a length to a time does not compile. A rotation function that takes deg rejects radians. At run time the units are gone: a float in metres is a float.
Every physics and animation programmer has a story about a value that was in the wrong unit for a week. This is what prevents it.
3. Layout belongs to the storage, not the type
struct Particle {
var position: Vec3
var velocity: Vec3
var life: float
}
var burst: soa []Particle
var debris: aos []Particlesoa stores one array per field, which is what a cache and SIMD want when a loop touches two fields out of ten. aos stores records, which is what you want when every field is touched together. The same Particle type works both ways, and a foreach over either reads the same. Switching a hot array from one layout to the other is a one-word change rather than a rewrite.
4. State machines are language constructs
need std.io.{Print}
machine Lamp {
state Off {
on Flip -> Warming
}
state Warming {
always -> On
}
state On {
on Flip -> Off
}
}
fun main() uses io {
var lamp = Lamp()
const _fired = lamp.Flip()
Print("{lamp.IsOn()}")
}Doors, weapons, AI, UI screens and quests are all state machines, and most codebases write them as an enum plus a switch plus a timer plus a bug where the timer outlives the state. In Wolang, machine and state are syntax, transitions can wait (on Interact after 3s -> Closing), unreachable states are a compile error, and a machine's current state survives a hot reload.
5. Reactive values
derived var is_alive: bool => health > 0A derived field recomputes when its inputs change. That is exactly what UI bindings and stat aggregation need (armour from items, damage from buffs, a health bar from health) without hand-written "dirty" flags.
And one more: systems the compiler schedules
component Velocity {
var x: float = 0.0
var y: float = 0.0
}
tag Falling
system ApplyGravity(dt: float, q: Query<mut Velocity, with Falling>) {
foreach v in q {
v.y = v.y - 9.81 * dt
}
}A system's signature says what it reads (Velocity), writes (mut Velocity) and filters on (with Falling). From that, the compiler builds the frame's schedule and knows which systems can run at the same time. wolang systems . prints it.
Small things, done differently
T? may be absent and T! may fail. Both are postfix, so a type reads left to right and Pawn?! means "maybe a pawn, or an error". Optionals need no Some/None vocabulary:
match count {
n? => n
null => 0
}Try it
The tour shows all of this with programs that CI compiles on every commit. The source is on GitHub. If one of these ideas is wrong, or you know where it was done better, Discussions is the place to say so.