2 ms·
> When you write on a terminal, you are encouraged to make good choices so that your code is clean, with a well-thought-out structure and conventions And then
by ASalazarMX 4y ago
> When you write on a terminal, you are encouraged to make good choices so that your code is clean, with a well-thought-out structure and conventions
And then you realize you have to refactor 25% of it, or the requirements change, or a newly incorporated library suggests a naming convention change would be wise... IDEs not only show the code, you can pick a function argument, rename it, and get it renamed across all source files, comments included.
If your terminal editor does that, then you've partially transformed it into an IDE.
- stonogo 4y agoYou don't even need a terminal editor to do that; sed will do it fine. If you want to be pedantic about the mechanism by which you achieve the result, you can just use ctags, which even plain vi and emacs support. What really set IDEs apart from text editors was integrated build tools and the ability to directly consume (and act on) build errors and the like. Search-and-replace long predates IDEs, as does 'code comprehension.'
- ASalazarMX 4y agoI've coded in plain text editors all the way to full blown IDEs, and you're partially right, it's not the tooling that sets IDEs apart, but the seamless integration between several useful tools. I like small editors for small jobs, but I wouldn't dream of doing a new business application without an IDE these days. With sed a simple search and replace would need to be manually checked for unintended effects, but an IDE will do it without problems in seconds, unless you go out of your way to confuse it.
- cecilpl2 4y agosed can't rename all references of MyUniquelyNamedClass::Update() to MyUniquelyNamedClass::Update2(). IDEs understand types and context.
- nomel 4y agoAn IDE is aware of the structure/meaning of the code, giving in much more power. sed absolutely cannot rename all the occurrences of something like a class method, since it would require deep dependency graphs to find all the class instances. In an IDE, I can do something like this: # All three classes have a do_thing() method. my_instances = { 1: Class1(), 2: Class2(), 3: Class3(), } my_instances[1].do_thing() my_instances[2].do_thing() my_instances[3].do_thing() In the IDE, I can rename the do_thing method for Class2, and it will correctly change the line "my_instance[2].do_thing()" to reflect the new name, leaving the others alone. This is not possible without something mostly indistinguishable from an IDE.
- dradtke 4y agoDoes an LSP-enabled editor count as an IDE then?
- invalidname 4y agoYou need a project view for that since it needs to go into all the files and do the "right thing" all over. It needs to verify external dependencies aren't broken as a result, etc.
- teeray 4y agoI get that functionality with go-guru for Go. Having powerful refactoring and static analysis tools shouldn’t require them to be integrated into a monolithic application.