{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreieeiddzzzpyn7agwepxwj7hreeimcxmfwuvwv4anhpws7vvapnffa",
"uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mfky3pxgoag2"
},
"path": "/t/pre-pre-rfc-splatting-for-named-arguments-and-function-overloading/24012?page=2#post_35",
"publishedAt": "2026-02-24T00:48:01.000Z",
"site": "https://internals.rust-lang.org",
"tags": [
"@Nadrieril",
"Improving usability of having many nearly-identical methods",
"tools and infrastructure"
],
"textContent": "`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:\n\nImproving usability of having many nearly-identical methods tools and infrastructure\n\n> 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…",
"title": "[Pre-pre-RFC] \"splatting\" for named arguments and function overloading"
}