Re: refactoring using parser
John Roth <[email protected]>
| Newsgroups | gmane.comp.programming.refactoring |
|---|---|
| Message-ID | <[email protected]> |
Peng Yu wrote:
>
>
> I feel that in order to do more rigorous refactoring the refactoring
> tools are better able to parse the source file. For example, I want to
> change a class name. The simplest solution is to do a string
> replacement, but this might accidentally change some variables with
> the same name.
>
> The ultimate solution is to figure which are the class names in the
> source code by parsing the source code, then do the replacements.
>
> But the problem is that it is not easy to write a parse for any
> full-blown languages (e.g. C++). It is also might take a lot of effort
> to understand existing compiler to add refactoring functionality.
>
> I'm wondering what is the current trend in solving the
> problem that I mentioned above.
>
> _,_._,___
I'm not entirely sure what you mean. If by "any full-blown language"
you mean "any language that's suitable for professional programming,"
there are lots of such languages with simpler syntax and which have
much better refactoring engines as a consequence.
If, however, you're using that phrase to avoid saying that C++ is the
only language you're concerned with, then I suspect that the eventual
fix will be to quit using C++, as well as other languages whose complexity
baffles automated quality tools.
John Roth
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/refactoring/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/refactoring/join
(Yahoo! ID required)
<*> To change settings via email:
[email protected]
[email protected]
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/