3 ms·
I get the sentiment that having features like "go to definition/implementation" can encourage poor code structure, but that is still ultimately a self-disciplin
by babypuncher 5y ago
I get the sentiment that having features like "go to definition/implementation" can encourage poor code structure, but that is still ultimately a self-discipline issue more than a UI issue. There are tools for enforcing good code structure that work with many of these fancy IDEs (Visual Studio included).
Just hitting F12 over an identifier to go to it's declaration will always be faster than manually navigating to it, no matter how fast you are with Vim, and I find these features particularly indispensable when learning someone else's codebase.
- arghwhat 5y ago> Just hitting F12 over an identifier to go to it's declaration will always be faster Nope - even if you need only one hit, you are now mildly disoriented and need to re-establish mental context in order to correctly interpret what you are reading[0]. Often, you need multiple hits to reach what you needed, in which case you are completely lost outside the single method body you're starting at. This cost is hidden, and not there during active navigation. Granted, the action is fast, but I have yet to see it make a productivity improvement. --- 0: an exception would be when you only needed a single methods implementation details, and it's nothing but primitive code that makes use of nothing else and requires no context. In this special case, being disoriented is inconsequential. However, you are usually looking for more than just what F12 throws at you.
- babypuncher 5y agoMultiple hits? Maybe in a dynamically typed language, but in a statically typed language a good IDE will know exactly what definition to go to 99% of the time. I mostly only have to pause and look at options when using the feature on an interface with more than one implementation.