The Source for Java Technology Collaboration
User: Password:



David Herron

David Herron's Blog

The Java programmer is without property

Posted by robogeek on December 21, 2007 at 01:22 PM | Comments (1)

Todays Editors daily blog references Properties Get No Respect .. and something clicked in my mind and communism started running through my mind. Property is highly valued by the ruling class ... something like: The bourgeoisie keeps more and more doing away with the scattered state of the population, of the means of production, and of property. It has agglomerated population, centralized the means of production, and has concentrated property in a few hands. The necessary consequence of this was political centralization. Independent, or but loosely connected provinces, with separate interests, laws, governments, and systems of taxation, became lumped together into one nation, with one government, one code of laws, one national class interest, one frontier, and one customs tariff.

So maybe this is a brain fart..

I think the analogy might be that if Java-the-language doesn't support 'properties' then the only ones who can code in a property-like fashion are those programmers witty enough to implement the property-like features themselves. Those programmers could be analogized to be the 'bourgoisie' of marx's philosophy, and that there is a conspiracy preventing the proletariat from enjoying property in Java-land.

Or something like that... or it could be a brain fart on the last day before christmas break.

button.text = "Click me" as syntactic sugar for button.setText("Click me!") seems like a small improvement but it would set the stage for larger capabilities. Joe Nuxoll has talked about this at length in javaposse podcasts, especially regarding component-oriented programming. You can browse all the proposals on one wiki site and even vote on them.

Myself I find it tedious to continually write the boilerplate ..


private String name;
/**
* Gets the name of this widget
* @return the name of this widget
*/
public String getName() { return name; }
/**
* Sets the name of this widget
* @param name the new name of this widget
*/
public void setName(String name) { this.name = name; }

This kind of thing seems like prime territory for syntactic sugar.


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Doesn't look like an interesting widget to me.

    If I look at the source of AbstractButton.setText, strangely enough I don't see just a single line of code. For any interesting object, mutation implies of fair amount of boilerplate fix up code. That sort of code is vastly more significant. It looks as if JavaFX has a smarter approach.

    Posted by: tackline on December 22, 2007 at 08:09 AM



Only logged in users may post comments. Login Here.


Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds