Small and explicit
Every name states its type. There is no null and no exceptions: missing
values are Option, failures are Result. The grammar is small.
Beans is a small object-oriented systems language built to be both exact and
low-level — as comfortable with accounting and billing as with databases and
operating systems. Files end in .b.
It has classes, interfaces, and inheritance with reference semantics; a small
grammar; exact decimal arithmetic; no null and no exceptions, only Option and
Result; deterministic object lifetimes with no garbage-collector pauses; and a
low-level unsafe layer for raw memory and C interop. One compiler, beansc,
checks your program and either runs it on a reference interpreter or compiles it
to a native binary through LLVM.
import std.io
fn main() { let name: string = "beans" io.println("hello from {name}")}Small and explicit
Every name states its type. There is no null and no exceptions: missing
values are Option, failures are Result. The grammar is small.
Predictable memory
Automatic reference counting with a cycle collector. There is no tracing garbage collector, so the straight-line path has no pauses, and destructors run deterministically.
Systems access
Files, sockets, threads, atomics, SIMD, shared memory, dynamic libraries, and a full C ABI, all through the standard library.
One command
beansc is the checker, interpreter, native backend, package manager,
language server, and debugger. One command installs it.