Hacker News new | ask | show | jobs
by Argorak 4254 days ago
Most text editors have naive autocomplete (using a words list and words they see), which catches 99% of these errors.
2 comments

I have experienced some problems with this kind of autocomplete in a JS project.

-Two methods shouldn't have a similar name, so you try to avoid it, possibly leaving you with a worse abstraction.

-You usually need to have all files open or at the same location, so modularization is discouraged.

-Libraries are usually not picked up by it.

-If you make a spelling error on the first usage you now have this spelling error everywhere.

Naive autocomplete is much better than none, but it's still not in the same league as context sensitive autocomplete.

YMMV, but I don't experience any of those problems. Also, I don't see where same names pose any problems.

Most advanced language plugins pick up libraries.

For example I use pabbrev mode in emacs, which learns what I type. It hints me away from most misspellings because it suggests the correct alternatives before I type them. Most of the long method and variable names for me are a prefix plus a TAB.

Nevertheless I'll try this gem.