571154 members! Sign up to stay informed.

Sponsored Links


Resources

Enterprise Java
Research Library

Get Java white papers, product information, case studies and webcasts

Blogs Blogs Blogs Messages: 0 Messages: 0 Messages: 0 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

More Comment on Java 7 Properties

Posted by: Kirk Pepperdine on Wed Jan 31 02:11:37 EST 2007 DIGG
In his blog Alex Miller adds more commentary on the growing debate on the new proposed Properties syntax for Java 7. Alex used Stuart Halloway's notion of hygienic syntax to help him sort out his position in the great language debate.

hygienic macros in Scheme [snip] basically mean macros that when expanded can’t break the meaning of the code they are used in.

Simply stated, non-hygienic syntax is one that dictates that any changes made will necessarily break the client’s implementation. Alex uses Object construction in his first example. In that example he demonstrates how a useful specialization can break clients code. The fix is to the factory pattern an interfaces. In his second example he turns to something more akin to the topic at hand, field access.

It is in his discussion of field access that Alex starts to lean towards the position that the new properties syntax isn't hygienic.

when you switch from using a field to a setter method, all calling code breaks and must be changed. Again, this is a non-hygienic syntax.

As Alex points out, all IDE’s generate the boilerplate code needed for get/set methods. The question is; if an IDE can encode this behavior so easily, is it not time to roll those changes up into the syntax/compiler? The debate continues.
Featured SectionFeatured SectionFeatured Section
Weekly Blogs UpdateWeekly Blogs UpdateWeekly Blogs Update
Stay current on the most informative blogs in the enterprise Java community. Join TheServerSide.com and sign up for the Blogs Update. Let TheServerSide.com do the work for you -- we scan thousands of blogs to find the ones most worthy of your attention.
Featured BlogsFeatured BlogsFeatured Blogs

Optimizing CMP Performance in Weblogic with Long-term Caching

Dmitri Maximovich has written a blog on optimizing CMP EJB performance in WebLogic, by addressing optimistic concurrency, along with some of the implications of doing so.

Using Lucene with OJB

Brian McCallister looks at the Lucene search engine and shows us how to index and retrieve objects from a sample Student application.

JDK 5 in Practice

Cedric Beust has been in a position to actually code with JDK 5 for over six months. He has written up his thoughts on the new features, and how he has found them to be in practice.

Dear Manager, They Need a Build Machine

Mike Clark has started a series of entries of letters that you wish you could write to your boss. It consists of concepts which seem so obvious to us, but which the bosses don't get.

Are we doing OR mapping wrong?

Brian McCallister has been playing with JDO 2 fetch groups, ZODB, thinking about TranQL, playing with Prevayler, and looking at TORPEDO.

Fear and Testing

Frank talks about fear and how it can derail efforts to find and solve scalability and performance problems. He has seen a lot of fear on his various engagements, and here he talks about why, and how.

Components, Design, and Functions

Brian McCallister has kindly rambled on about IoC, and design in web applications. He discusses what has worked well for him (and others) in the last year.

JDK 1.5 from Joshua and Neal

Matt Raible went to the Denver JUG meeting with Neal Gafter, and Joshua Bloch. They discussed the new features of Java 5, and Matt details the features, and when to use them.
Featured Blogs Archive

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
All Content Copyright ©2007 TheServerSide Privacy Policy