{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreid656jxhcckgwmtyznhlq3ygr4lbfgfvopqke7wtfhjixofylslmu",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mev3uat2gju2"
  },
  "path": "/t/pre-pre-rfc-splatting-for-named-arguments-and-function-overloading/24012#post_6",
  "publishedAt": "2026-02-15T07:33:16.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "Nadrieril:\n\n> Function overloading at home\n\nNot really: the tuple trait is nightly only, and doesn't even have a tracking issue. So this only works inside std.\n\nNadrieril:\n\n> Named arguments at home\n\nThat doesn't work on stable as far as I know? Or did derive of Default become implicit recently? It would be helpful if you included the required `#[feature]` directives in your examples.\n\nNadrieril:\n\n> The syntax is `..ident: Type` in function arguments, and is called \"splatting\".\n\nI fear this will encourage awful APIs with dozens of arguments, as seen in C++ and Python (and maybe other languages, but those are the ones I'm most familar with that suffers from this).\n\nNamed arguments (struct case) are slightly better, but still have you seen some of the insane examples in popular python libraries? You tend to end up with lots of similar operations being stuffed into one function using 16 different optional arguments, like the proverbial square peg in the round hole.\n\nI'm slightly opposed to this for named arguments, but strongly opposed to this for positional arguments. Especially since nothing seems to prevent you from accepting both `(String, i8)` and `(i8, String)` which leads to the full madness of C++ overloading.\n\nThat _will_ be abused and lead to worse errors. We already see this with traits that are implemented for several different tuple lengths, like in axum. Rustc will list a number of \"did you mean\" but it is all useless `(T)`, `(T, U)` etc, rather than what you were actually looking for.",
  "title": "[Pre-pre-RFC] \"splatting\" for named arguments and function overloading"
}