Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Can't you just do that with passing a struct + Default[1]?

[1] https://doc.rust-lang.org/std/default/trait.Default.html



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: