Autocomplete predicts a continuation as someone writes. In programming, it offers code suggestions inside developer tools, often using a language model fine-tuned for code. A programmer can specify a language and describe a desired function in a comment or docstring; the system proposes an implementation, usually as a quick first attempt rather than a guaranteed solution. section 6.6
Code autocomplete works especially well when:
- The code has clear structure and repeating patterns, such as repeatedly called functions. section 6.6
- The programmer wants to iterate quickly from a reasonable first draft, while checking results for failures, especially in complex functions. section 6.6
- The user wants pair-programming assistance rather than a system acting autonomously. section 6.6
A function described in a docstring
A programmer writes a natural-language description of what a function should do. An autocomplete tool then attempts to implement that function, turning the description into code that can be reviewed and revised. section 6.6

