Re: What Refactorings Would you Like for C
- From: moi <root@xxxxxxxxxxxxxxxxxxx>
- Date: Thu, 27 Mar 2008 20:45:55 +0100
On Fri, 28 Mar 2008 07:58:49 +1300, Ian Collins wrote:
pingu219 wrote:
Hi I'm currently a student working on an honours-level project toExtract function (pull a block of code out into a function) would be
create a visual tool which will be able to represent C project files
and code as well as allow the user to perform high and certain low-
level refactorings.
At the moment I'm compiling a list of refactorings which are applicable
to C that people who program alot with structured programming languages
find useful.
So far I've got (some I got from someone else's post on another google
group):
- Rename variable/function
- Move variable/function
- Reduce scope of variable
- Publish function (make it public, put a declaration in the .h file) -
Perish function (make it static, remove it from the .h file) -
Add/Remove parameter from function
- Reorder function arguments
- Remove unnecessary includes
number one on my list.
I sometimes put all the global variables of a .c file (and the .h file,
of course) into a
(useless) struct. Just to force me to track all the places where it is
referenced. But again: that is not refactoring.
AvK
.
- Follow-Ups:
- Re: What Refactorings Would you Like for C
- From: dj3vande
- Re: What Refactorings Would you Like for C
- References:
- What Refactorings Would you Like for C
- From: pingu219
- Re: What Refactorings Would you Like for C
- From: Ian Collins
- What Refactorings Would you Like for C
- Prev by Date: Re: c,c++,obj-c
- Next by Date: Re: What ONE thing should the CIO understand about managing/motivating developers?
- Previous by thread: Re: What Refactorings Would you Like for C
- Next by thread: Re: What Refactorings Would you Like for C
- Index(es):
Relevant Pages
|