Skip to content
CATALYST

Now in design: a practical language

Build clear, reliable software

Catalyst keeps the common path obvious — direct names, tidy modules, and errors that explain the next move — without losing the joy of a small, readable program.

A taste of Catalyst

Catalyst is still early, but the design target is already sharp: code for people who care what gets allocated, copied, hidden, and returned. It should read plainly at the call site while still exposing the machinery a systems programmer expects to see.

01

Explicit cost

Borrowed slices, resource-owning values, and dynamic dispatch are visible in source instead of smuggled through convention.

02

Cheap failure

Closed error sets keep the happy path clean while making the caller handle exactly the failures an API can produce.

03

Comptime as code

Types, contracts, and generated shapes come from ordinary functions, not a second macro language.

04

Tooling has teeth

Diagnostics, formatting, modules, and package boundaries are part of the language design from the start.

decode_header.ct
const std = module("std")

const DecodeError = error {
  ShortHeader,
  BadMagic,
  UnsupportedVersion,
}

const Header = struct {
  const magic: u32 = 0x43544c59
  version: u16
  flags: u16
}

fn decode_header(bytes: []const u8) Header!DecodeError {
  if bytes.len < 8 {
    return .ShortHeader
  }

  const magic = std.mem.read_u32_le(bytes[0..4])
  if magic != Header.magic {
    return .BadMagic
  }

  const version = std.mem.read_u16_le(bytes[4..6])
  if version > 1 {
    return .UnsupportedVersion
  }

  return Header{
    .version = version,
    .flags = std.mem.read_u16_le(bytes[6..8]),
  }
}

fn main() void!DecodeError {
  const header = try decode_header(
    "\x59\x4c\x54\x43\x01\x00\x00\x00",
  )
  std.testing.assert(header.version == 1)
}

Why Catalyst?

Readable by default

The common path should be obvious: direct names, tidy modules, and errors that explain the next move.

Made for systems that last

Predictable semantics, maintainable tooling, and careful evolution — documented from the ground up.

A good host for ideas

The tour starts small, then grows toward modules, data modeling, errors, tests, and packages.

Explore

New to Catalyst

Start with the getting started guide and follow the language tour.

Start the tour

Language design

Read the design wiki for current scope, principles, semantics, compiler notes, and standard library direction.

Read the design notes

Tracking progress

Read the news for release notes, language design updates, and community announcements.

See the latest news

Follow Catalyst as it grows

The examples on this site are intentionally lightweight starters. Replace them as the Catalyst parser, compiler, and standard library settle.