Polyglot | Program

A program is defined once and rendered into many languages, and back into Program itself.

The ultra-simple syntax of Program has been especially designed to transpile on an individual, line-by-line basis using simple text processing. The compiler stores each module in a canonical command form and renders it per target. The logic, the names and the order stay the same; only the punctuation each language needs is added.

Those three lines become idiomatic JavaScript, Dart, Swift, Go, Rust or Zig, with the shape unchanged. See the same counter rendered across every target on the targets page.

When rendering Program to its different targets, the conventions and limitations of each target have to be taken into account: some languages allow deep nesting of namespaces, and some have firm conventions for capitalisation. The table below gathers the specifics for each target; each target page also lists the reserved keywords it must steer clear of.

Recommended articles