[Pre-pre-RFC] "splatting" for named arguments and function overloading
Personally, I am quite partial to the approach used by Swift. It’s quite natural to have .sort() and .sort(by: key) instead of .sort() and .sort_by_key(key) (Swift’s ability to have distinct callsite names and function body names is also quite nice. Inside the body of .sort(by: key) the argument specified with by would be called key). As methods this isn’t a big difference but sort(slice, by: key) is much better than sort_by_key(slice, key).
This form of non-optional keyword arguments is effectively letting you spread the name of the function between the arguments as best for clarity instead of Rust’s approach (name of the function including all the arguments up front, then unnamed arguments) or Python’s approach of free-form chaos where named arguments can be placed in any order and are syntactically optional. I think the safest form of “overloading” is one where you are only allowed to overload based on the sequence of (possibly empty) names of arguments and not based on types.
I think it would honestly be perfectly suitable to Rust, and since it’s just a fancy flavor of naming functions, it poses no issues for type inference/name resolution/etc. It also comfortably avoids all the bullshit and confusion you get with Python-style named arguments (which is exactly what big arg structs with ..Default::default() give you) where one function can do a variety of similar things with different sets of arguments and you just have to know which combinations of arguments are legal and which are invalid or override each other)
Discussion in the ATmosphere