I don’t think that C++ style default parameter values will fit well in Rust. We don’t have overloading except via traits, while C++ already allowed type and argument number overloads.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Pre-RFC: make function arguments for Option-typed arguments | 11 | 2094 | March 25, 2019 | |
Optional function arguments | 14 | 3447 | September 25, 2024 | |
An approach to resolving some issues with optional arguments | 4 | 2361 | June 1, 2022 | |
What about `unwrap_or_from` methods? | 10 | 830 | July 11, 2020 | |
Std lib should implement From<Option<T>> for Option<E> where T: Into<E> | 4 | 728 | December 1, 2021 |