June 5, 2026
No parents, just drama
Nine Ways to Do Inheritance in Rust, a Language Without Inheritance
Rust Says “No Inheritance,” and the Comments Said “Well, Actually…”
TLDR: The article says Rust can mimic many things people want from inheritance using other tools, even though it doesn’t have classic class hierarchies. Commenters immediately fought over the label, with some calling it clever problem-solving and others saying it’s just inheritance cosplay with extra steps.
A new Medium post tried to answer a surprisingly spicy question: how do you get inheritance-like behavior in Rust, the programming language famous for saying “we don’t do that here”? The article walks through nine different workarounds for the stuff inheritance usually does in other languages—sharing methods, sharing behavior, and making different things act alike—without using classic parent-and-child classes. In plain English: Rust still gets the job done, but with a toolbox of smaller parts instead of a big family tree.
But the real fireworks were in the comments, where readers instantly turned this from a coding explainer into a definition war. One camp basically said, “Nice list, but this isn’t inheritance at all.” The sharpest critics argued the piece was really about different ways to fake the effects of inheritance, not inheritance itself. That’s peak programmer drama: not “does it work?” but “are we allowed to call it that?”
Others were even more niche—and somehow even more dramatic. One commenter scolded the article for missing a pattern they say is one of Rust’s coolest tricks, calling it “inheritance in a type-theory trench coat,” which is the kind of joke that makes developers laugh and everyone else blink twice. And then came the practical crowd: one reader admitted they rarely miss inheritance except in user interface design, where reusable building blocks can make apps much easier to assemble. So yes, the article offered nine solutions—but the comments made it clear the real story is that Rust fans are still arguing over whether the language solved inheritance, sidestepped it, or just renamed it and moved on.
Key Points
- •The article says Rust does not support class inheritance, inherited fields, or subclass declarations.
- •It identifies three common goals of inheritance in object-oriented design: shared interfaces, shared behavior, and shared storage.
- •The article presents nine Rust design puzzles that map inheritance-like problems to Rust techniques such as traits, impls, bounds, macros, and composition.
- •In the first example, the `RangeSetBlaze` crate needs multiple integer types to provide `min_value` and `max_value` while sharing helper behavior.
- •The article demonstrates using a Rust trait with required methods and a default method, `exhausted_range()`, to share behavior across types like `u8` and `i16`.