Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
vvanders
on July 20, 2017
|
parent
|
context
|
favorite
| on:
Announcing Rust 1.19
Can't you just do that with passing a struct + Default[1]?
[1]
https://doc.rust-lang.org/std/default/trait.Default.html
static_noise
on July 20, 2017
[–]
It seems like you can... but then this could be done implicitly at no loss and lead to less clutter. It's not hard to understand what default parameters or named parameters do.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
[1] https://doc.rust-lang.org/std/default/trait.Default.html