Building a new programming language from scratch is a monumental undertaking. In this episode, we talk to Richard Feldman, creator of the Roc programming language, about building a functional language that is fast, friendly, and functional. We discuss why the Roc team moved away from using Rust as a host language and instead is in the process of migrating to Zig. What was the decision-making process like? What can Rust learn this decision? And how does Zig compare to Rust for this kind of systems programming work?
CodeCrafters helps you become proficient in Rust by building real-world, production-grade projects. Learn hands-on by creating your own shell, HTTP server, Redis, Kafka, Git, SQLite, or DNS service from scratch.
Start for free today and enjoy 40% off any paid plan by using…
Building a new programming language from scratch is a monumental undertaking. In this episode, we talk to Richard Feldman, creator of the Roc programming language, about building a functional language that is fast, friendly, and functional. We discuss why the Roc team moved away from using Rust as a host language and instead is in the process of migrating to Zig. What was the decision-making process like? What can Rust learn this decision? And how does Zig compare to Rust for this kind of systems programming work?
CodeCrafters helps you become proficient in Rust by building real-world, production-grade projects. Learn hands-on by creating your own shell, HTTP server, Redis, Kafka, Git, SQLite, or DNS service from scratch.
Start for free today and enjoy 40% off any paid plan by using this link.
Show Notes
About Roc
Roc is a fast, friendly, functional programming language currently in alpha development. It’s a single-paradigm functional language with 100% type inference that compiles to machine code or WebAssembly. Roc takes inspiration from Elm but extends those ideas beyond the frontend, introducing innovations like platforms vs applications, opportunistic mutation, and purity inference. The language features static dispatch, a small set of simple primitives that work well together, and excellent compiler error messages. Roc is already being used in production by companies like Vendr, and is supported by a nonprofit foundation with corporate and individual sponsors.
About Richard Feldman
Richard Feldman is the creator of the Roc programming language and author of “Elm in Action.” He works at Zed Industries and has extensive experience with functional programming, particularly Elm. Richard is also the host of Software Unscripted, a weekly podcast featuring casual conversations about code with programming language creators and industry experts. He’s a frequent conference speaker and teacher, with courses available on Frontend Masters. Richard has been a longtime contributor to the functional programming community and previously worked at NoRedInk building large-scale Elm applications.
Links From The Episode
- Zig - Better than Rust?
- Rust in Production: Zed - Our interview with Richard’s colleague with more details about Zed
- Richards blogpost about migrating from Rust to Zig - Sent in by many listeners
- Elm - Initial inspiration for Roc
- NoRedInk - Richard’s first experience with Elm
- Haskell - A workable Elm on the backend substitute
- OCaml - Functional language, but pure functions only encouraged
- F# - Similar shortcomings as OCaml
- Evan Czaplicki - Creator of Elm
- Ghostty - Terminal emulator from Mitchel Hashimoto with lots of code contributions in Zig
- RAII - Resource acquisition is initialization, developed for C++, now a core part of Rust
- Frontend Masters: The Rust Programming Language - Richard’s course teaching Rust
- Rust by Example: From and Into - Traits for ergonomic initialising of objects in Rust
- The Rust Programming Language: Lifetime Annotations on Struct Definitions - Learn from Roc: try to avoid having lifetime type parameters
- Rust By Example: Box, stack and heap - Putting objects on the heap can slow down your application
- Design Patterns: Elements of Reusable Object-Oriented Software - Seminal book popularising many common patterns in use today, written by the so-called “Gang of Four”
- Casey Muratori: The Big OOPs - Game developer explaining why OOP was an obvious mistake for high performance code
- Alan Kay - Coined the term “object-oriented” while developing the Smalltalk language in the 70s
- Niklaus Wirth - Working on Modula, a modular programming language, at the same time
- Kotlin - A new and popular language, basically Java++
- Go - Popular “greenfield” language, i.e. not coupled to an existing language, not using the object oriented paradigm
- Cranelift backend for Rust - A faster backend than LLVM, but still not released
- Andrew Kelly - Creator of Zig
- Software Unscripted - Richard’s Podcast
- GPUI - Zed’s own UI crate
- Structure of Arrays vs Array of structures - A big source of unsafe code in the Rust implementation of Roc
- The Zig Programming Language: comptime - Zig’s replacement for Rust’s proc-macros, with much broader utility
- crabtime - Comptime crate for Rust
- Roc - Roc’s namesake, the mythical bird
- Rust in Production: Tweede Golf - Podcast episode with Volkert de Vries, one of the first contributors to Roc
Official Links
- Roc Programming Language
- Roc on GitHub
- Richard Feldman on GitHub
- Richard Feldman on LinkedIn
- Richard Feldman on X
- Software Unscripted Podcast
About corrode
“Rust in Production” is a podcast by corrode, a company that helps teams adopt Rust. We offer training, consulting, and development services to help you succeed with Rust. If you want to learn more about how we can help you, please get in touch.