Rust Keyword Arguments, Optional Arguments, and Variable-Arity
github.com
github.com
Rust is young; it learns from the mistakes of old languages and picks the best.
E.g. Python's default arguments were declared once; JavaScript's are recreated on each invocation.
Maybe I'm too biased by the current state, how do you think optional arguments would make it better?
I'm not sure I could devise a full explanation, but a concise example is in scientific libraries for functions like, `run_simulation(data, optimizer = "Lebesque", shearing_algorithm = "Neue", spline_intensity = "Forrester")`. The number of options can be very large.
Would still make sense to you to get one without the other? I think optional is much more possible than named :P