3 ms·
At least from my experience working in Python, if you don't know which instance `item` is, it's a problem with your code— not the editor. Automatically taking y
by ceol 15y ago
At least from my experience working in Python, if you don't know which instance `item` is, it's a problem with your code— not the editor. Automatically taking you to that class's method is another story, but I don't think you should depend on your IDE to figure out your logic for you.
- koenigdavidmj 15y agoWhat 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?
- teraflop 15y agoWhy 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.
- jasonkester 15y agoAh, but the issue isn't you knowing which 'item' you're dealing with. It's that the IDE doesn't know, and therefore can't jump you there instantly if you ask it to. Instead, you have to open the file in question and go find the method using one of the fiddly text-based methods that the article mentions. So no, we're in agreement that the entire codebase belongs in your head. It's just nice to have your IDE also have the entire codebase in its head, in the actual configuration it is, rather than just knowing about a bunch of text files containing words that have no meaning to it.
- ceol 15y agoI suppose it was a misunderstanding. I took this >knowing that my codebase has half a dozen classes that expose a .hide member. I hesitate even to ctrl+click on it in this editor, because I know it'll either do nothing or take me to the wrong definition. to mean you were relying on your IDE to tell you which .hide() method you were calling. As others have pointed out elsewhere, I think giving that functionality to ST2 would push it too far into the realm of IDE.