esolang

Gotolang

One instruction a line, and every road goes through goto.

icitry, 2026 · Turing complete: yes · ●○○ easy · esolangs.org

Tested with 5 known programs · Test method

Run it

Expected: Hello, World!

The idea

icitry made Gotolang in 2026 and wrote its interpreter in Rust. The specification says the only instruction is goto, plus a few more. There are no blocks, loops or functions. A loop is a label, a comparison and an if that jumps back, so a program reads like the assembly a compiler would make of it.

Read the story

Variables need no declaration. They hold signed 64-bit integers and start at 0. The showpiece is a brainfuck interpreter written in Gotolang, with 10 tape cells and programs of at most 29 commands, typed in as numbers. It is not the older GotoLang.

The machine

InstructionDoes
label nameMark a place to jump to
goto nameJump there
eq a b lt a bSet the flag to whether a = b or a < b
if nameJump when the flag is true
set x a add x a sub x aSet x to a, add a to x, take a from x
print a print "text"Print a number or a string
read xRead an integer into x
haltStop

An operand is an integer or a variable. Only print takes a string, with escapes such as \n. A # starts a comment. Unknown labels, labels defined twice and malformed lines stop the program before it runs. The specification leaves overflow open, and numbers wrap at 64 bits.

Example

The count sets the flag with lt i 5.
Expected: 0 1 2 3 4

The count sets the flag with lt i 5. While it is true, if body jumps into the body; once i reaches 5 the next line, goto done, leaves the loop.

The factorial has no multiplication to use, so its inner loop adds old to fact i times.

Expected: Enter n: n! = 120

On 10 it prints 3628800. The prompt and the answer share a line, as print adds no line feed.

Patterns it teaches

  • Counter machines; variables to add to and take from, a test and a jump are all a program needs.

Further

Also in Turing tarpits

Write your own in Run Convert a program from Gotolang

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: gotolang.

Command line

shib run gotolang -e 'print "Hello, World!"'
shib manual gotolang

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/gotolang.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org