Skip to content
Ard Logo Ard Logo

Ard

A general-purpose programming language designed for legibility, simplicity, and type-safety

Readable

Ard code is easy to read and understand with clear, expressive syntax designed for readability.

Simple

There should be one obvious way to do things.

Safe

Type errors are caught at compile time and runtime errors are handled as values.

Reliable

Ard compiles to Go, making it fast, efficient, and portable.

use go:fmt
fn main() {
mut numbers: [Int] = []
fmt::Println("numbers.size = {numbers.size()}")
fmt::Println("adding numbers from 0 to 10")
for i in 0..10 {
numbers.push(i)
}
fmt::Println("numbers.size = {numbers.size()}")
for n in numbers {
fmt::Println(n)
}
fmt::Println("7th element = {numbers.at(6)}")
}

Ard combines elements from JavaScript, Swift, Go, and Rust. It follows Go’s philosophy for readability from left to right, rather than the usual spiraling syntax found in C-based languages (read more).

Ard does not have exceptions. Instead, errors are represented as values using the built-in Result<$Val, $Err> type. This approach makes error handling explicit and facilitates fault-tolerant programming.

Variables and functions are statically typed. The compiler can also infer types in most cases, reducing verbosity while maintaining safety.

Variables and data structures are immutable by default and must be marked as mutable to prevent unwanted data mutations.

Without return keywords, the returned value of a function is always the last expression when a function signature states the return type.

Learn More.