Re: AbiWord on Linux/Alpha

Subject: Re: AbiWord on Linux/Alpha
Date: Wed Feb 09 2000 - 10:25:44 CST

Kevin Vajk wrote:

> On Tue, 8 Feb 2000 wrote:
> > How about just taking out the declarations
> > of variables not used? Instead of shutting
> > up the compiler, why can't clean code be
> > written?
> The warnings I see are from unused function
> parameters, which are a little different in
> my mind than unused variables in
> functions.

With due respect, I disagree. If a varaiable is
not used (either a parameter or a function
body variable) it has no place in the code...
unless you'd like to get a big number out of
wc -l command :-)
> And unused parameters are not necessarily unclean
> code. In many cases, they are useful for OO
> programming; you pass an object's method all
> the data it might need, not knowing
> that this particular object's method doesn't
> need all of it.

I beg to differ. The designer of any given class
knows the functionality of the method and consequently
the data it needs to chew on. For any given data item
in the whole scope of the program, there are only
two choices : It is either needed by the method or it
is not needed and consequently it is accessible to
the code in its body as a parameter or it is not
accessible. If the method body is not using the
parameter, what purpose does it serve? Who is the
one in doubt whether some data might be needed by
the function? The caller? The callee? What does OO
programming have to do with this? If you want access
to the data pass it as a parameter (or access some
other appropriate way) else don't pass it as a parameter; it is as simple as that.

If you think I am missing something kindly point
it out with an example.



Get your free email from AltaVista at

This archive was generated by hypermail 2b25 : Wed Feb 09 2000 - 10:25:47 CST