Skip to content
Better HN
Top
Best
Ask
Show
New
Jobs
Search
⌘K
0 points
PxldLtd
3mo ago
0 comments
Save
Share
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.
0 comments
1 comments · 1 top-level
top
newest
oldest
Pay08
3mo ago
It does have defaults, the above example manually sets everything to show people reading the docs what that looks like.
j
/
k
navigate · click thread line to collapse