Roc, a programming language designed to combine the developer experience of Elm with performance approaching that of Rust and C++, has reached version 0.1.0. According to creator Richard Feldman, design work began in 2018 with the goal of creating “an Elm-inspired experience for the long tail of use cases.”

The language prioritizes both runtime performance and fast feedback loops. Performance benchmarks across four community projects show promising results. In compression tasks, Roc’s roc-deflate implementation had a median slowdown of 2.6% compared to C’s libdeflate on an M1 MacBook Pro and 8.9% on a Ryzen 3900X. A regex implementation built by the community benchmarked faster than the popular regex Rust crate, though this involved different matching algorithms. For web serving, roux—built on top of a Zig webserver—benchmarked competitively against Rust’s axum crate and vanilla Go.
Build times also demonstrate efficiency. Cold builds (without cached data) ranged from under 100ms for type-checking to several seconds for full development builds across various projects, with subsequent warm builds showing significant improvements from caching.
Roc’s design includes several distinguishing features. The type system enforces a naming convention where functions with side effects must end in an exclamation mark (!), making effectful code visually distinct from pure functions. The compiler prevents effectful functions from being called in pure contexts. Pure functions are evaluated at compile time when possible, allowing syntax validation and other checks to occur before runtime.
The language includes automatic memory management and is stricter about memory safety than Rust, design choices that carry runtime performance costs compared to lower-level languages. Despite these trade-offs, Feldman states the goal is to get as close to C and Rust performance as possible within Roc’s constraints.
The community has already built applications using Roc, including Joy, a full-stack web framework; native macOS and Windows application platforms; a 3D game engine; and commercial screenwriting software. The language includes features like zero-allocation lambdas and opportunistic mutation optimization in the compiler.
Key facts
- Roc 0.1.0 represents eight years of language design and development
- Compression benchmark shows roc-deflate within 2.6-8.9% of C performance
- The language enforces pure vs. effectful code distinction through naming conventions and type system
- Pure functions are evaluated at compile-time when possible for optimization and error detection
- Existing production applications include web frameworks, native app platforms, and commercial software
