External Publication
Visit Post

[Pre-pre-RFC] "splatting" for named arguments and function overloading

Rust Internals [Unofficial] February 24, 2026
Source

by with by_key actually can make sense, especially if the function inputs are being constructed alongside some kind of user input. It's by_cached_key that winds up changing the meaning enough from by_key. @Nadrieril here's some very relevant motivation:

Improving usability of having many nearly-identical methods tools and infrastructure

Rust libraries, especially the standard library, often end up having multiple slightly different variants of methods: try_, _checked/_unchecked _ref, _mut, and occasionally _ptr, _mut_ptr, _drop split and search × forward and reverse exclusive and _inclusive unlimited, limited to n, and _once _start/_end, _prefix/_suffix sort × stable/_unstable _by closure, _by_key, _by_cached_key, and _floats collections × _in allocator _uninit, zeroed fallible try _with_capacity (_and_hasher) _withi…

Discussion in the ATmosphere

Loading comments...