Properties Get No Respect
height="130" />There has been another flurry of discussions about
in Java and minor
language enhancements, together with the usual flurry of “ href="http://weblogs.java.net/blog/robogeek/archive/2007/12/should_java_sta.html">leave
the language alone” lamentations.
Conspicuously absent from this discussion was
pet unappreciated language feature, native properties. Properties get no
respect. Every few weeks, href="http://blogs.sun.com/joe/entry/java_properties_and_events">another
blogger comes along and says “we need a property syntax”,
proposes something, and moves on to greener pastures.
At best, properties are dull. Programmers who work with Swing, JPA, JSF components, XMLEncoder/Decoder, and other "beanish" technology cringe every time they have another class with a bunch of annoying trivial getters and setters. But it isn't the end of the world. They can cringe and keep on coding. How much gratification is there in making people cringe less? Apparently not enough to put together a proposal that deals with all the pesky details.
height="75" />But it gets worse. While worrying about pesky details, the hapless property syntax designer needs to fend off a barrage of attacks from the
inevitable naysayers (“What's the big deal...Eclipse writes the getters
and setters for me”) and the OO purists (“Properties are the tool
of the devil...they break encapsulation”).
As a result, most of the effort about properties has been half-hearted and scattered about
in the blogosphere. There was never enough momentum to arrive at a
consensus. Nikolay Botev, a computer science student at SJSU, has done
something about that. In his independent study project, he collected every
reference about properties he could find, in Java and other languages, and
put all the information into a Wiki. He also added nifty voting buttons to
/>While everyone else is madly milling about at the mall, please take a few
minutes to see check it out: href="http://oslo.cs.sjsu.edu:8080/xwiki/bin/view/JavaProperties/">http://oslo.cs.sjsu.edu:8080/xwiki/bin/view/JavaProperties.
If you are a properties enthusiast (you know who you are), please make an
account and add to the Wiki.