LANGUAGE / 2026 / EXPERIMENTAL

ain_

A programming language built for code written by AI.

General-purpose by design, AI-authored by intent. Ain combines compact prefix syntax, inferred primitive types, and a functional-first foundation with an intentionally extensive standard library.

MIT licensedRust compilerPre-alpha
01 / THE LANGUAGE

Less scaffolding. Still code.

No `fn` keyword, call parentheses, or explicit integer annotations in this example.

example.ainAIN SOURCE
add a b = + a b
square x = * x x

result = add square 3 square 4
print result
output25
02 / TOKEN BENCHMARKS

Less code. Fewer tokens?

Source-code token counts from the latest published Ain benchmark snapshot, refreshed from GitHub approximately every hour.

PUBLISHED BENCHMARK DATA

5 matched programming tasks

TOKENIZER / o200k_base
Ain
98baseline
Python
126Ain −22.2%
TypeScript
150Ain −34.7%
Rust
192Ain −49.0%
Source tokens for the same tasks in four languages
TASKAinPythonTypeScriptRust
Arithmetic16202431
Factorial23283343
Generics19253138
Lists23333548
Strings17202732

Lower is better. Small hand-written examples, counted with the same tokenizer. Not LLM prompt, reasoning, retry, or total generation tokens.

03 / DESIGN

Designed for generated programs.

01

AI-first source

Fixed-arity prefix expressions and minimal punctuation aim to keep generated programs short and predictable.

02

Functional-first

Data transformations are the default, with explicit mutable state and controlled side effects when needed.

03

Batteries included

The experimental runtime is growing collections, JSON, filesystem, network, and other built-in operations.

04

Native compilation

The Rust stage-zero compiler works alongside a limited direct AIR-to-LLVM backend and a self-hosting experiment.

04 / GET STARTED

Run an example.

The Nix development shell is the recommended setup. Requires Rust and the native toolchain.

git clone https://github.com/honerop/ain.git
cd ain
nix develop
cargo test
cargo run -- run examples/arithmetic.ain