This is the mail archive of the frysk@sources.redhat.com mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Endless getters() and setters()


Mark Wielaard wrote:
Hi Phil,

On Tue, 2007-03-06 at 19:40 -0600, Phil Muldoon wrote:
Is there any preferred style with using $subject in classes that have class data? I find a mix in Frysk and in Frysk-Imports. I find myself endlessly writing getters and setters in emacs, that gate variables, and I find really they serve no real purpose other than to be hall monitors and clutter up the code. I'd really not write them at all. So I decided to ask what other people do.

This got discussed a little on irc,

Further conversation on #classpath and ...
If however you intend the code to be
used as a more or less stable interface by "outside" code then direct
field access is not so nice.

Right now it is only used by Frysk, but someday it might be used as generic Java access to libelf. I've decided in the cases here just to continue to user get/set. After thinking about the api issues, it really only makes sense to do it this way.


Regards

Phil


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]