Chris Uppal schrieb:
> Seriously, I think a good case can be made for the IDE issuing warnings
> for obvious public getters/setter pairs.
That would be "Warning: You are using a getter/setter pair, which is
stupid" for me ;)
> Now /that's/ an idea! Type g-e-t and press the autocomplete key, and the IDE
> finds and removes all the getter methods.
[quoted text clipped - 5 lines]
> P.S. Seriously, I think a good case can be made for the IDE issuing warnings
> for obvious public getters/setter pairs.
That's appealing to me, but given the number of frameworks and contexts
where the JavaBeans specification is needed for interoperability with
external software, I'm afraid I don't think it's too awfully reasonable.
For example, objects accessed from JSP EL expressions, JSF backing
beans, lots of ORM classes, visual GUI design components, etc. all need
to have these getter/setter pairs in order to work properly.

Signature
Chris Smith - Lead Software Developer / Technical Trainer
MindIQ Corporation
Chris Uppal - 29 Jun 2006 11:49 GMT
[me:]
> > P.S. Seriously, I think a good case can be made for the IDE issuing
> > warnings for obvious public getters/setter pairs.
[quoted text clipped - 5 lines]
> beans, lots of ORM classes, visual GUI design components, etc. all need
> to have these getter/setter pairs in order to work properly.
I'm not convinced that the fiields you list are important enough to be taken to
/define/ what good code looks like.
Anyway -- as an academic question -- it would be interesting to see what the
technologies you mention would have looked like if their designers hadn't
choosen the path of least resistance (for themselves) and thus encouranged poor
structure in their users.
-- chris