hanki

hanki

A statically typed language with Ruby-flavored syntax, Erlang-style actors, and one effect system underneath both. There are two tiers from one front end: a bytecode interpreter with a REPL, and an ahead-of-time compiler. Both are equally supported.

# The smallest program that shows both layers: a pure function and an action.

use io

def greet(name: string) -> string
  "Hello, #{name}\n"
end

def main!() -> () [io]
  io.print!(greet("world"))
end

Pure functions and actions share the keyword def; the ! on the name tells them apart. greet has no !, and can therefore perform no effect; neither can anything it calls, which the checker enforces. main! has one, and [io] says which capability it needs. Actors are built from actions; the three layers share one effect system.

failure is a value or an effect · the two tiers must agree · the REPL is the language · testing is part of the language · no warnings

Status

spec-first. Most of what follows describes the target design. Section 22 tracks what is implemented.

The source is not public yet either, and none of this can be done today.

The whole tree is 0BSD (what that means for your programs).

building it · reference