Worst is a simple, malleable programming language built for extensibility and creativity.


Worst is designed to be easy to learn, understand, and implement, with only a few core concepts to consider.


You can override any and all functions and syntax to change the language at will.
Redefine the syntax reader, the error handler, or pretty much everything else, and make Worst your own.


Adding new functionality and syntax to the language is as easy as writing normal code.
Static type checking, custom error handlers, new loop styles, DSL blocks, use-once variables, debugging symbols, function decorators and attributes, here documents, user-defined data types, nasal demons — many features you might think have to be baked in to a programming language are implementable in plain Worst.


Worst is not just a language for experimenting with programming; it will also support a variety of creative applications such as procedural music and graphics.
It will hopefully grow into a tool that anyone would be excited to pick up and make something cool with — programming experience optional.


Hello World
; 'hello' shows you The Message.
define hello [ "Hello, " swap string-append "!\n" string-append print ]

; All hail The Message.
"World" hello

; Use the magic word 'upquote' to peek into the future of the program.
define hello-forwards [ upquote hello ]

; It's actually not magic, sorry.
; 'upquote' is a combination of 'quote' (from Lisp) and 'uplevel' (from Tcl).
hello-forwards "friends"

; 'quote' takes the next piece of source code and puts it on the data stack.
; 'uplevel' lets you mess with the call stack.
define greetings [ quote hello-forwards uplevel ]
greetings "human"
Masquerading as a normal language


; Regular-looking function syntax with named arguments
import syntax/function

function hello(s) {
    ; Doesn't affect the rest of the language
    "Hello, " s string-append "!\n" string-append print
hello("new syntax")

; Multi-value assignment
import syntax/assign

; A contrived example that returns multiple values
function add-mul(a b) { a b add a b mul }

[cool thing] := add-mul(2 2)

cool thing equal? if [
    println("2 + 2 = 2 * 2! Amazing!")
] [ er, that should have worked ]