5 ms·
Yeah this is all over Rust codebases too for good reason. The argument is that default params obfuscate behaviour and passing in a struct (in Rust) with default
by PxldLtd 6mo ago
Yeah this is all over Rust codebases too for good reason. The argument is that default params obfuscate behaviour and passing in a struct (in Rust) with defaults kneecaps your ability to validate parameters at compile time.
- Pay08 6mo agoIt does have defaults, the above example manually sets everything to show people reading the docs what that looks like.