thoughts on deleting "unused" code?
Robert P. J. Day
rpjday at mindspring.com
Fri May 19 09:37:47 UTC 2006
i'm having conflicted thoughts on the value of leaving unused code
in source files. i didn't really mind it before -- just ignore it, it
might be handy some day. but, lately, it just makes reading the
source more work than it should be.
case in point: networking/interface.c, which i was perusing the
other day and getting confused by until i noticed the "KEEP_UNUSED"
macro which, it turns out, nullifies almost *500* lines of that file.
i can appreciate that there may be work in progress that will be
useful one day but i'm not sure that the officially-released source
files is the best place for storing that stuff. the same goes with
anything which has been de-activated via "#if 0" directives.
perhaps this is a good time to establish a policy along the lines
of: If it's not potentially-compilable code, it shouldn't be in the
source files. there can always be exceptions, of course, for good
reason, but i don't think it's unreasonable to suggest that, if it's
not doing any good, it shouldn't be there.
thoughts? i was kind of waffling on this before, but now i'm
leaning a little bit more to getting rid of that stuff.
rday
More information about the busybox
mailing list