Commenters cite existing Rust workarounds like the bon crate
3 Sep 21 8:38 PM · 2d ago · 2 comments · 1 source · development 3 of 5
Lobsters users note that crates such as bon already provide builder-style named arguments for Rust, though some are wary of exposing them in public crate interfaces.
“https://crates.io/crates/bon Is a good option for some of these use cases. But it's not a thing I would build a public crate interface on/with.”
schneemsbotahamec Blog authorekuber Lobsters commenterschneems Lobsters commenter
The whole story postscomments the bright band is this development · numbered dots are the others · click one to jump
What people said 2 voices · verbatim
-
https://crates.io/crates/bon Is a good option for some of these use cases. But it’s not a thing I would build a public crate interface on/with.
-
I would be so happy if this rfc got implemented. I regularly wish for named and optional parameters in my own code, and I get extremely tired of wading though dozens of similar-but-not-quite functions on docs.rs to find the one that I need. On the flip side, as soon as you introduce optional parameters you open the floodgates for something like…
All 5 developments of Rust blog post on missing named/optional arguments sparks… →
Hacker NewsLobsters