Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What about parameters to functions?

  def spam(eggs):
      eggs.<TAB>
Should autocompletion go find all callers of spam() and see what they are passing in in order to determine what should be available at that point?


Why not? IntelliJ can do exactly that for Java code -- right-click on a variable and choose "dataflow to here". Even in large projects, it's practically instantaneous. Of course, in Java you don't need that much information for autocompletion since you can just look at the static types.

The same kind of global dataflow analysis would have to be approximate in a dynamic language, but I'd still expect it to be better than nothing.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: