Analysis

Yoshua Wuyts outlines effects, substructural and refinement types for Rust

Yoshua Wuyts published a long essay on March 5, 2026, arguing Rust should invest in richer effect types, substructural rules like `!Forget`/`!Move`, and refinement types to extend safety and ergonomics.

Nina Kowalski3 min read
Published
Listen to this article0:00 min
Share this article:
Yoshua Wuyts outlines effects, substructural and refinement types for Rust
AI-generated illustration

Yoshua Wuyts framed a compact manifesto for Rust in a long-form essay titled "a grand vision for rust" published March 5, 2026. "I don’t think I’ve ever quite articulated my “grand vision” for Rust, despite having written a fair bit about the language and its features. There is a lot I could say here, but currently there are three directions of development which I find particularly interesting:" he wrote, then enumerated the three areas: 1. Improving Rust’s support for effects, 2. Improving Rust’s support for substructural rules, and 3. Adding support for refinement types in Rust. He added, "If you’ve followed my work in Rust even a little bit for the past few years, this might provide some clarity about what exactly it is I’m trying to work towards here."

In the effects section Wuyts pointed to existing function distinctions and to the broader research context: "Rust has support for `const fn` and `async fn` on stable Rust. And on nightly it also has support for `try fn` and `gen fn`." He noted these are commonly called "function colors" and more formally "effect types" as part of "type-and-effect systems." Wuyts warned that "Dealing with only one or two effects is generally fine. But the more effects you add the more painful they become to work with." The provided excerpt shows he intended to list specific guarantees functions might receive but that passage is elided with "[...]" in the captured text.

On substructural types Wuyts introduced compact annotations and a mechanistic sketch: "`!Forget` unlocks linear types" and "`!Move` unlocks ordered types." A footnote in the post reads, "Move unlocks ordered types in a way that actually composes with the rest of the language, unlike `Pin`. To be fully ergonomic does however also depend on emplacement in the language, which I believe is best expressed as an effect." The post places substructural work alongside effects, arguing composition and ergonomics must be solved together.

Wuyts grouped refinement types with memory-safety classifications and runtime opt-ins. He wrote, "“Use after free” is more formally known as a temporal memory safety violation. Its sibling is the “out of bounds error” which is also known as a spatial memory safety violation (ref)." He continued that "In Rust the borrow checker can entirely statically guarantee we never run into use after free bugs. However if we want to relax those rules a little, we can opt-in to using types like `Rc` and `Arc` which check those properties at runtime instead."

The post sparked community discussion across platforms. A Hacker News entry titled "A Grand Vision for Rust" had 15 points and two comments in the captured snapshot; commenter pjmlp warned of Scala 3–style complexity and listed "Swift 6, OxCaml, Chapel, D, Linear Haskel, OCaml effects" as ecosystems that went different directions, while satvikpendem wrote they "use the `anodized` crate right now for refinement type features" and expressed hope for convergence with languages like Ada and Lean. On Lobste.rs the item appeared in the plt rust section with nine comments; jjw wrote they were drafting a similar post focused on dependent types and urged not to forget uniqueness types, referencing the paper "Data Race Freedom à la Mode" from the OxCaml team. Lobste.rs commenters also pointed to ATS2 as an experimental home for such features and typesanitizer cautioned that any additions to Rust carry an expectation that usability and error-message quality must not degrade.

Wuyts presented his essay as a clarification of his multi-year work on Rust, with three concrete directions and a mix of research-minded proposals and terse implementation sketches. The captured excerpts leave a gap where a list of function guarantees was elided, and the conversation that followed centered on trade-offs between stronger type-system expressivity and the language's current ergonomics.

Know something we missed? Have a correction or additional information?

Submit a Tip
Your Topic
Today's stories
Updated daily by AI

Name any topic. Get daily articles.

You pick the subject, AI does the rest.

Start Now - Free

Ready in 2 minutes

Discussion

More Rust Programming News