aCollection.<TAB>
list of all the method on given collection pops up. If it's short, just skim it and choose something which appropriate. If it's long: aCollection.l<TAB>
check if there's something similar to length/len, use it, otherwise: aCollection.l<BACKSPACE>c<TAB>
check if there's something similar to count then use it, if not: aCollection.l<BACKSPACE>s<TAB>
check if there's something similar to size and use it. Finally, if all the guesses failed, defer to documentation or google.Basically, (semantic) auto-complete is an inline quick-search facility for docs. Very, very useful if you know how to use it effectively.
I get your point though and there are cases where completion might be useful, but for me the context-switch to a search engine is just not that much of a hassle, but maybe I never enjoyed a good completion engine, so I might give it a try.
import module
module.<TAB>
and: def meth(self, ...):
self.<TAB>
and even: foo = Foo()
foo.<TAB>
It doesn't work for all possible cases, but as you said, you can always consult Google. It's just that I prefer not to leave my editor if I don't really have to.OTOH, I work with a lot (10+) of different languages and find even the dumb, basic autocompletion (which only offers to autocomplete words already present in the file) helpful. As other commenters noted, writing aLongAndDescriptiveFunctionNameToCall from memory every time may be inconvenient for two reasons: a) was it aLongAndDescriptive... or aDescriptiveAndLong...? and b) writing this much text takes time, and the more letters you have to type the more probable a typo gets.
Anyway, I think you should give a try to a few different auto-completion plugins/systems and see for yourself. You should probably spend a little time to configure such a plugin so that it doesn't get in your way when it fails (ie. has no good completion to offer), but once you make it so the auto-complete may become really helpful to you. Or it may not, but I think it's worth checking out.
In 5 years, once average computers are very fast, you will get something like.
len -> did you mean size()
based on the fact that so many other people have entered that.
I am sure there are other ideas besides that haven't even occurred to us.
But you need some user testing, and maybe some ML.
I mean, the machine needs to train enough to know that when the user types "string.len" they really mean "size(string)" and it can't just follow the alphabet anymore.
Of course then you have to deal with the case where the suggestion is subtly wrong (e.g. amount.add(increment) was intended to mutate the amount, while Number.plus is a pure function) and the programmer might not spot it, if they were unfamiliar with the correct usage in the first place. Now we are firmly in research territory, I think.
1. Do it in the cloud somewhere. You probably want to do this anyway so you can learn from everyone.
2. Now you can't indefinitely keep everyone's code in the cloud (as kite is learning), so you take the most common use cases and privacy minded coders can download those to their desktop.
3. Of course languages are constantly evolving so the "cloud archive" will always be live and learning from everyone
By the way, you would "learn" a mapping when someone searches for "len, length, .len" and so on but they finally settle on "size" so you would have the input and the correctly labeled target from people's code. You do have to watch them programming in practice though.
For the subtle variations, it would hopefully give you a list of suggestions in order of usage.