3 ms·
The problem with non-greppable code isn't that "you should use an IDE". I use rust-analyzer and I dislike non-greppable code. One concrete issue I ran into is
by nyanpasu64 5y ago
The problem with non-greppable code isn't that "you should use an IDE". I use rust-analyzer and I dislike non-greppable code.
One concrete issue I ran into is that when cleaning up a list of imports, I can't use Ctrl+F to find out which ones are unused, since I can accidentally remove a trait which is never used by name but only imported for its methods. And I can't count on rust-analyzer's unused import detection working 100% of the time. And it's bad that some methods (for example the infamous `Read` or two `Write` traits) are inaccessible unless you add a trait import (which rust-analyzer sometimes knows how to add when I press Ctrl+.).
To me, the overarching value of Rust is locality of reasoning, and clearly indicating nonlocal reasoning in explicitly-readable and machine-checkable ways (eg. the `Cell` family of types). Trait methods are nonlocal reasoning, and they aren't clearly demarcated (a trait import behaves as`use module::Trait::*` but isn't written that way in the source code). If you're opposed to wildcard module name imports, you should be opposed to wildcard trait method imports.
- pjmlp 5y agoThat only shows how much it is lacking versus proper IDE experiences. IDEs for other languages provide plenty of capabilities to code navigation, no need to go Ctrl+F.