Roc 0.1.0: Eight Years In, the Fast, Friendly, Functional Language Ships Its First Numbered Release

Nov 30, 20266 min read
0
Roc 0.1.0: Eight Years In, the Fast, Friendly, Functional Language Ships Its First Numbered Release

Eight years after Richard Feldman began designing a language to bring the Elm experience beyond the browser, Roc has its first numbered release: version 0.1.0. It is explicitly not 1.0 -- the team has deliberately avoided promising stability -- but it is a milestone for a project that has survived a full compiler rewrite, a major architectural crisis, and the departure from almost every convention its creator originally sketched.

Roc's tagline has stayed constant through all of it: fast, friendly, functional. The goal is a language that builds faster than Go and runs programs nearly as fast as Rust, with tooling and error messages in the spirit of Elm, and with security and reliability guarantees that no mainstream language offers today.

A brief history of a long road

Feldman, author of "Elm in Action," started designing Roc in 2018 as an Elm-inspired language for "the long tail of use cases" -- servers, command-line tools, native GUIs, editor extensions, even the logic for a physical flap clock. Elm was then focused entirely on user interfaces, and Feldman wanted the same simplicity and compiler-driven reliability for everything else.

The first compiler commit landed in 2019. The project was announced publicly in 2020, contributors began arriving, and promising early results were presented at Strange Loop 2021. The road was not smooth. Along the way, the team hit a major architectural problem, discussed in detail in 2024, which led to a decision in early 2025: scratch-rewrite the compiler from Rust in Zig. The rewrite took 487 days and roughly 300,000 lines of code, reached feature parity in 2026, and produced some striking side benefits -- binaries less than half the size of what the Rust compiler generated, and hot code loading that works out of the box during development.

The rewrite also changed the language itself. Static dispatch replaced the earlier abilities system, the pizza operator was removed in favor of method chaining, when ... is became match, Result became Try, and lambda syntax moved from \a -> to |a|. Many of these changes cascaded from just two root decisions: static dispatch and purity inference. Remarkably, the standard library types still look close to Feldman's original 2018 sketches.

Timeline of Roc's journey from 2018 design to the 0.1.0 release, including the 2025 Zig compiler rewrite

What 0.1.0 delivers

Roc 0.1.0 compiles to standalone binaries with hot reloading out of the box, or to WebAssembly. It combines Hindley-Milner type inference with purity inference and static dispatch, and uses a novel system of platforms and applications to build on lower-level languages without a foreign function interface compromising the language's guarantees.

The platform architecture is Roc's most distinctive idea. A platform handles memory management and all I/O -- networking, files, HTTP -- while the application written in Roc remains purely functional. The same application code can run on different platforms unmodified, and platforms can even optimize memory management for their domain: a web server platform can use arena allocation and reclaim an entire request's memory in one operation, while a command-line script platform can skip deallocation entirely.

The performance question

One of Roc's stated goals is to approach the performance of Rust and C++ without quite matching it, since automatic memory management and stricter memory safety both carry runtime costs. The 0.1.0 announcement includes benchmarks across community projects, and the most impressive is roc-deflate, Niclas Ahdén's pure functional compression library compared against C's libdeflate across 144 benchmarks. The median slowdown was 2.6 percent on an M1 MacBook Pro and 8.9 percent on a Ryzen 3900X -- a remarkable result for a garbage-collected, memory-safe functional language built with the highest optimization levels on both sides.

Bar chart comparing roc-deflate and libdeflate compression throughput on the Silesia corpus

The design reasoning here is deliberate. Roc should generally outperform dynamic and gradually typed languages like Python, JavaScript, and Go, because types are tracked only at compile time and language constructs carry minimal runtime overhead. Matching unsafe C is explicitly out of scope.

The language in practice

Roc's syntax signals effects directly. Effectful functions are marked with a ! suffix and a thick arrow in their type; pure functions use a thin arrow. Reading a file looks like File.read_utf8! returning a Try type -- success yields a string, failure yields one of an anonymous structural tag union of errors, which can accumulate without upfront type definitions. The ? operator, borrowed from Rust, propagates errors without exceptions or null, and there is no null at all.

The type system is sound, with 100 percent inference and optional annotations everywhere. The compiler even performs type inference on JSON parsing at compile time and generates a JSON.parse implementation from the inferred shape, so a runtime structure mismatch produces a proper parse error rather than a silent unsound mismatch.

The friendliness claim is backed by more than error messages. A 2,000-line GUI robot-arm application by contributor Luke Boswell demonstrates hot code loading: edit the source while the app runs, and changes appear with all state preserved -- no third-party watch tooling required. Ambitions remain broad: competing with Go and Rust for servers, Swift and Kotlin for GUIs, and Python for scripting, while explicitly ruling out the systems-programming speed crown and data science.

Eight years, one version number

It is worth asking why a project would wait eight years for 0.1.0. Part of the answer is deliberate expectation-setting: holding off on a numbered release made clear that nothing was stable. With the Zig compiler complete, benchmarks public, and contributors like Boswell, Anton-4, Folkert de Vries, Brendan Hansknecht, and many others driving subsystems, the team felt ready to draw a line in the sand.

Roc is not yet recommended for production, though early adopters like Vendr have used it there, calling Roc functions from a Node.js backend one function at a time. Concurrency primitives, first-class effects testing, and an online playground remain out of scope. The language itself, and the story of getting here -- two compilers, one community, and a stubborn commitment to both speed and friendliness -- now has its first version number to grow from.

Discussion

0 comments

Stay informed as a product watcher.

Market insights that help you start and grow your business.