Hacker News new | ask | show | jobs
by clintjhill 5110 days ago
But it's not. In fact intelligent completion is incredibly hard for dynamically typed languages. Those IDE that do perform intellisense or autocomplete with dynamic languages do it with very basic ability. In a real world dynamically written code file the editor simply has no way of knowing the members of a class. Or if it is even a "class".
5 comments

No one's saying it's easy, but enough IDEs have done it that some of us have come to expect it.
I started programming on VB3 and spent many years doing Visual C++ and C# as well as quite a bit of Java with IntelliJ. I depended deeply on IntelliSense/autocomplete. Years later, I don't remember how I ever got anything done with that stupid distracting drop down box. It's just so easy to arrow up/down through that list and hope to stumble upon the correct method to call. On the rare occasion that I type that member accessor dot and don't know what I want, I much prefer full-sized documentation in a browser that I can cmd+f on.
Using it as an alternative to documentation is a small part. First of all you get a confirmation that what you have up to that point is somewhat correct. If the dropdown doesn't show then something's wrong - sometimes that's ok and expected. You also get a type confirmation and actual completion as in type one or two characters and have the rest filled out for you.
It's just a different style of working, but I almost never type long symbols. I go to their definition site, yank them into a buffer, and paste them into place.

Or, I work with a REPL. So I write the code there and run it before putting it into my code base, so I know it's correct.

Only for old and static languages.
Actually, Eclipse's Python support is decent. You can infer a lot about what a type is by what methods and properties are accessed. It's not perfect, but it can do a decent job of it in a lot of cases.
How old is old?
Sometimes the simples things are hardest to implement. Visual voice mail - No brainer, but took a decade.
I am still looking for a Perl IDE which offers autocomplete - or at least the option to jump to where the currently selected method is defined. Something like the Groovy/Grails-support in IntelliJ - but of course, Groovy is somewhat easier to autocomplete because of the underlying Java class system.
IntelliJ does really impressive type inference in Groovy. I can write all sorts of dynamic code and it autocompletes surprisingly well. Not as great as Java, obviously, but impressive nonetheless.
Unless that dynamic language is Google Dart. The Dart Editor's intellisense works just fine.