Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> For refactoring, that's just an advanced text across many files manipulation feature, and emacs certainly can do it, but you might have to work on your .emacs file.

Re-factoring is text editing, if you consider parsing to be advanced text editing(which it is not). Consider a class Foo implementing method foo, and a class Bar implementing a method of the same name foo. When I am renaming Foo.foo to Foo.bar, a refactoring tool will rename based on the semantics.

Renaming manually will always require looking through all occurrences, compared to clicking a couple of buttons in Eclipse and being assured it renamed all occurrences without any false positives or negatives.

Also, the nature of dynamic languages make it harder to refactor:

    class Foo:
        def foo():
            pass

    class Bar:
        def foo():
            pass

    def a_func(arg):
        arg.foo()
Now, in arg.foo, arg can be an instance of Foo, or Bar, or Baz...In a large codebase, manually doing it will be a night mare.

I mostly use vim, linux and dynamic languages. But that doesn't change the fact that Eclipse/Java is leaps and bounds ahead when we are talking re-factoring.

Also, I use rope for Python. Though it mitigates most of the warts, it can't mitigate the issue in the snippet above. There is an `unsure` mode which renames when unsure, but that's not a smart thing to do on a large codebase.



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

Search: