{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreicr3qmlc4iqgzw2vro6sip7tdrkpphsc5pd7uzzl76vi55ndlkgpi",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mggqxn7cqab2"
  },
  "path": "/t/top-level-self-functions-fn-f-self-t/23620#post_19",
  "publishedAt": "2026-03-07T00:03:47.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "CAD97:\n\n> Then there's also the \"power of the dot\" in IDEs. You take an expression and type `.` and you get a decent fuzzy search for all of the type's available methods, or rather what you can do with the type / what that type can do. If this kind of IDE assistance isn't in use and functionality is all either remembered or found via searching code or documentation, then the \"power of the dot\" is minimal.\n\nafetisov:\n\n> That sounds like a feature request for your IDE.\n\nRegarding IDE experience, I think being able to write from `do(it)` to `do(it.that())` instead of `do(that(it))` has a non-trivial improvement since for the latter I need to edit in 2 places, and moving the cursor to 2 places is slower than to 1. My habit for the latter is to drag my cursor to select the whole expression and type `(` then click after `do(` and type `that`. I'd think it will be a bit clumsy for IDEs to support\n\n  * this edit with a keybinding: it takes 2 pieces of information (start, end), so you will need to select the whole expression (instead of only having to place the cursor somewhere)\n  * autocomplete suggestions taking the first argument: if you only place the cursor at the start of `a().b().c` it is not clear whether you want `xxx(a())`, `xxx(a().b())` or `xxx(a().b().c)`; you can design the IDE to choose the last as default but then for the other 2 cases you will need to select the expression with cursor. (Whereas if the function can be called method-like you only need to put your cursor before the right dot in `a().b().c`)\n\n",
  "title": "Top-level self functions `fn f(self: T)`"
}