Please don't confuse dead code and commented-out code
Tor Lillqvist
tml at iki.fi
Mon Jun 11 23:33:23 PDT 2012
Just a small thing, but still: Several cleanups recently have removed
commented-out code. That is good. But the commit comments say that
"dead code" was removed. That is misleading.
Dead code is (according to Wikipedia) "code in the source code of a
program which is executed but whose result is never used in any other
computation". Personally I would have said that dead code is code that
is present in an executable (program or shared library) but is never
executed, i.e. a synonym to unreachable code.
Anyway, dead (unreachable) code is something else than commented-out code.
I am sure we have lots of actual dead/unreachable code too, and
finding and removing it reduces the size of our binaries. I suspect we
have significant amounts of code that would be reachable under some
complicated condition that actually never is true (any more). Figuring
out that can be hard of course.
--tml
More information about the LibreOffice
mailing list