lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev Dead code tactics: call for comments


From: Kim DeVaughn
Subject: Re: lynx-dev Dead code tactics: call for comments
Date: Sat, 13 Mar 1999 15:47:20 -0800

On Fri, Mar 12, 1999, Philip Webb (address@hidden) said:
|
| > as a relative newcomer to the source tree, I've been diverted many times
| > by code only to find it was sitting in a #if 0-type construct.
| > A smaller distribution means new coders have an easier time learning
| > how to program for lynx and don't waste time patching dead code.
|
| i hope LE & KD will comment on this issue: both may be absent right now.

Hmmm.  I don't really have too much to say about it ... I didn't really
run into much "dead code" in any of the things that I've added to lynx,
so it's a non sequitur, from that perspective.

On the general question of dead code removal ... I'm all for doing so
in general, so long as the removed code is still preserved someplace,
and if dead fn()'s are removed in their entirity, there should be some
sort of an "index" of them.

OTOH, I *can't* see removing small 1 or 2 line fn()'s that form part of
a general, orthogonal function-set, even when not currently used.  For
example:

 HText_canScrollUp            ()
 HText_scrollTop              ()
 HText_scrollBottom           ()
 HText_scrollUp               ()
 HText_scrollDown             ()

are all very small, self-contained fn()'s, that are part of an HText_
movement suite fn() set.  I think it would be silly to arbitrarily
remove them, since together they probably account for less than 100
bytes of obj code, and less than 25  lines of source.  They would also
seem to have high potential of being used in the future.

In short, I think deletions should be done on a case-by-case basis,
with some value-judgement applied, rather than blindly chopping out
*all* unused fn()'s.

A bit more work, to be sure, but a better result in the end, IMO.

/kim

reply via email to

[Prev in Thread] Current Thread [Next in Thread]