A language for everything.
Games, tools, apps, operating systems. One small compiler, gstc, turns it straight into fast native programs for Windows, Linux, ARM, Android and bare metal -- no other compiler, linker or runtime needed.
gstc 0.95include "standard.sth" as std
struct Planet
name: str
moons: i32
endstruct
fn by_moons(a: Planet, b: Planet): bool
return a.moons > b.moons
endfn
var planets: [4]Planet
planets[0] = Planet(name: "Earth", moons: 1)
planets[1] = Planet(name: "Jupiter", moons: 95)
planets[2] = Planet(name: "Mars", moons: 2)
planets[3] = Planet(name: "Saturn", moons: 146)
std.sort_by(planets[0 until 4], by_moons)
for p in planets do
std.write(p.name) std.write(": ") std.write_int(p.moons) std.writeln("")
end
Fast, native, small
Real machine code from gstc itself. --release builds have no runtime checks, like C.
Safe while you build
Ordinary builds check every integer, index and cast, and stop with the exact line and the chain of calls.
Everywhere
Windows, Linux (x86 and ARM), Android apps and freestanding kernels from one source.
Full control
Pointers, raw memory, system calls, ports, calling any C library -- nothing is hidden.
Readable
Blocks close with words (end, endfn), no braces, no surprises.
Batteries included
Collections, text, JSON, regex, hashing, compression, graphics, windows and more.
Download gstc 0.95
Unzip and run. gstc needs nothing else installed. New to it? Start with the tutorial.