|
|
|
|
|
by DemocracyFTW2
691 days ago
|
|
could you do that with `struct` / `record` fields? In JavaScript which doesn't have named function parameters either I often write functions with a single `cfg` parameter that are called like `f({ hours: 2, seconds: 53, })` which I find nice b/c it re-uses existing data structures. |
|
It would have to look something like:
The defaults could come from some value / function with a name shorter than Default::default(), but it would be less clear.