× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This is a multi-part message in MIME format...
--
To: java400-l@midrange.com
From: jamesl@hb.quik.com
X-Advert: http://emumail.com
Reply-To: jamesl@hb.quik.com
Date: Tue, 09 Apr 2002 18:28:19 EDT
X-Mailer: EMUmail
Subject: Re: Java Style Question

Which is it? I categorically disagree with the notion that performance is a

non-issue; on the matter of setters and getters vs. direct access and

manipulation, I almost never substitute direct manipulation for a setter
method
unless there's simply no way for it to go wrong. On the other hand, if
a value
is not being made available to outside classes, and doesn't require
any sort of
"massage," and there's no other overriding reason to use a
getter, then I see
nothing wrong with direct access.

I also tend to take
steps to avoid defining inner classes for functionality
that could as easily
be implemented in the classes requiring the functionality,
because each
additional class adds to the overhead, and to recognize situations
that
could lead to exceptions, and deal with them before they do so, rather
than
falling back on try/catch to handle things that are already expected. In
one
case, I solved somebody else's problem by doing
so.

--
JHHL




As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.