public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
* Please, keep it private
@ 2007-09-06 13:54 Andrew Cagney
  0 siblings, 0 replies; only message in thread
From: Andrew Cagney @ 2007-09-06 13:54 UTC (permalink / raw)
  To: frysk

Hi,

This change is interesting:

        * TestValue.java: Make all fields private.
        (longBEUnsignedType): Delete.
        (intBEUnsignedType): Delete.
        (shortBEUnsignedType): Delete.
        (byteBEUnsignedType): Delete.
        (floatBEType): Delete.
        (doubleBEType): Delete.
        (longUnsignedType): Delete.
        (intUnsignedType): Delete.
        (shortUnsignedType): Delete.
        (byteUnsignedType): Delete.

notice the consequence, of making those fields private.

When adding a field please start with the most private scope possible, 
even make it final.  Similarly, delay adding either a getEr or setEr 
method until it is clear that it is needed.

If we remember to do this, refactoring is relatively easy (dead 
variables are even identified by the compiler).  If we don't do this 
we're left with an accumulating pile of [likely] dead fields and 
methods.  something none of us want :-( :-)

Andrew

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-09-06 13:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-06 13:54 Please, keep it private Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).