From OOP to Rust – struggling with code organization and data structure design
⚓ Rust 📅 2026-04-22 👤 surdeus 👁️ 2I'm a developer coming from a strong OOP background (Java/C#). In OOP, I had a clear mental model: everything is an object, and I could split code into classes without much doubt.
Now I'm learning Rust, and I feel genuinely lost. I'm questioning whether I'm actually a good developer, because I don't have clear criteria for:
- When to use a
structvs. just passing data around? - How granular should my structs be? I'm afraid I'm either splitting too much or not enough.
- What is the "right" way to organize code in Rust? In OOP, I'd instinctively create small, cohesive classes. But in Rust, the same instinct feels arbitrary.
I know Rust isn't an OOP language, but what is its dominant paradigm? Is it "data-oriented", "functional", or something else? I want to understand the philosophy so I can think in Rust, not just translate OOP patterns.
I'm not looking for syntax help – I've read the Book. I need design principles , heuristics , or resources (books, articles) that teach the art of structuring Rust code correctly.
If you've been through this transition, what helped you the most? Are there any telltale signs that I'm over-engineering or under-engineering my data structures?
Thank you.
4 posts - 4 participants
🏷️ Rust_feed