Reference

TorbScript

The documentation of TorbScript - learn the language, look up every rule, every package of the standard library and every command of its tools.

TorbScript is a programming language for scripts, tools and servers. Its command is torb and its files end in .trb. It is statically typed, with value semantics: a second name is a copy, and every change is marked. There is no null and no exception: a value that may be missing or a call that may fail says so in its type. torb run starts a program at once, and torb build turns the same program into a fast native one.

Learn#

Look up#

Sections#

  • Learn to program - A course for people who have never written a program, in thirteen short lessons you do in the browser, each with one idea and one small exercise.
  • Learn TorbScript - For people who already program - a fifteen-minute tour, then one short page per idea, all of it done in an evening.
  • The language reference - One page per construct of TorbScript, grouped by area, with the exact rules and the mistakes each construct invites.
  • The standard library - One page per package of std, what each contains, and which of them are in scope everywhere without an import.
  • Task recipes - One page per task for somebody who already knows the language: the steps, the pitfalls, and one complete program that works.
  • Why the language is like this - The arguments behind the decisions, and the contrast pages for people and models arriving from Rust, Swift, Kotlin or TypeScript.
  • The toolchain - The torb command, the project files, and how to verify that what you wrote is correct and in the formatter canon.

Pages#

  • Glossary - Every term this documentation uses, one entry each, at most two sentences. The entry decides which word is correct.
Esc