Hacker News new | past | comments | ask | show | jobs | submit login

An 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.



Does an LSP-enabled editor count as an IDE then?


You 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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: