3 ms·
There are 3 ways autocomplete can be used: 1) As automatic documentation in a well-typed application. Autocomplete shows you the public properties or methods a
by chrischen 4y ago
There are 3 ways autocomplete can be used:
1) As automatic documentation in a well-typed application. Autocomplete shows you the public properties or methods available based on what data you have started typing, and it's not guessed but guaranteed to be valid assuming your types are correct.
2) As dumb autocomplete, where it just tries to guess based on the symbols in the document, and save you some keystrokes/remembering.
3) As the Copilot style autocomplete where it will finish the entire line, and not just the next token—with the downside that it's really just guessed.
I can see where 2 and 3 can be avoided, but 1) is really invaluable and often almost required in some strictly typed languages. I remember the days of writing PHP where I had to google for the function signatures every time because of inconsistent naming, and lack of typing. Memorizing these things is honestly a waste of a programmer's brain space. But now that I write exclusively in typed languages, auto-complete in the form of 1) has been invaluable not for the purposes of remembering names of things but being able to see what functions/methods are valid and can be used. No need to look up documentation manually anymore.