this post was submitted on 24 Sep 2026
48 points (100.0% liked)
Rust
8304 readers
40 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I agree - Structs are kind of a nicer solution here. Especially because it's pretty common to pass a whole set of options through the call stack.
In Python land you end up with functions with 30 arguments and when they want to pass them anywhere they give up and use
kwargswhich are completely awful and should almost never be used.Unpack[T]exists, but nobody uses it sadly. Also, it's probably better to just use a dataclass or something instead anyway, but nobody does.