The Java programmer is without property

; Date: Fri Dec 21 2007

Tags: Java

Todays Editors daily blog references (web.archive.org) 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 (web.archive.org) 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.

Source: (web.archive.org) weblogs.java.net

About the Author(s)

(davidherron.com) David Herron : David Herron is a writer and software engineer focusing on the wise use of technology. He is especially interested in clean energy technologies like solar power, wind power, and electric cars. David worked for nearly 30 years in Silicon Valley on software ranging from electronic mail systems, to video streaming, to the Java programming language, and has published several books on Node.js programming and electric vehicles.