Animal is a programming language where operators, control flow and data structures are expressed with animal calls and behaviors with fully‑feathered (get it?) language with functions, nests (classes), lists, file I/O and symbolic error handling.
go install github.com/animal-lang/animal/cmd/animal@latest
# Start the REPL
animal --repl
# Run a program
animal path/to/script.anml
Try this simple Animal program:
roar "Welcome to the animal kingdom!"
age -> 5
weight -> 10
total -> age meow weight
roar "Total:", total
Intuitive syntax – meow, woof, moo, leap, pounce, howl and more!
Modern tooling – Interactive REPL, execution timers (animal --time) and debugging output (animal --debug).
Deep standard library – File helpers (drop, fetch, sniff_file), symbolic error handling (try/catch blocks), list methods (sniff, snarl, prowl, wag, …) and math utilities.
Nests and functions – Build reusable abstractions with nest definitions and first‑class howl functions.
Runs everywhere – Native Go binary plus a WebAssembly build so Animal code can run in the browser.
VS Code – Install the Animal Language extension for syntax highlighting, icon theming and language configuration.
Online playground – Try the language directly in your browser at Animal Playground.
Full guides, language reference and standard library docs is available at animal.readthedocs.io.
git clone https://github.com/animal-lang/animal.git
cd animal
go build -o animal ./cmd/animal
go test ./...
-- Conditionals
n -> 5
growl n <= 1 {
roar 1
} wag {
roar n moo n
}
-- Loops
leap i from 0 to 5 {
roar i
}
-- Functions
howl calculate_area(length, width) {
length moo width sniffback -- Multiplication
}
area -> calculate_area(5, 10)
roar "Area:", area
log_path -> "log.txt"
pack -> ["lynx", "otter", "stoat"]
pack.sniff("mink")
drop(log_path, "Pack members: " purr pack)
*[
howl find_index(name) {
idx -> pack.howl(name)
idx growl -1 sniffback
}
roar "Mink index:", find_index("mink")
]* *(
roar "Something went wrong:", _error
)* *{
"Missing pack member"
}*
Animal is released under the MIT License.