<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: My thoughts on the Java 7 property debate</title>
	<atom:link href="http://tech.puredanger.com/index.php/2007/01/26/java7-property/feed/" rel="self" type="application/rss+xml" />
	<link>http://tech.puredanger.com/2007/01/26/java7-property/</link>
	<description>Alex Miller&#039;s technical blog</description>
	<lastBuildDate>Mon, 06 Feb 2012 19:39:50 -0800</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
	<item>
		<title>By: Darren Cruse</title>
		<link>http://tech.puredanger.com/2007/01/26/java7-property/comment-page-1/#comment-139220</link>
		<dc:creator>Darren Cruse</dc:creator>
		<pubDate>Sat, 31 Jan 2009 16:35:42 +0000</pubDate>
		<guid isPermaLink="false">http://tech.puredanger.com/2007/01/26/java7-property/#comment-139220</guid>
		<description>Have thought for some time Java was overdue for some &quot;syntactic sugar&quot; around properties.  I&#039;ve recently been working with Objective-C which has an optional &quot;@property&quot; directive and dot syntax, yet otherwise it&#039;s notion of properties as methods is much the same as javas under the covers.

And I agree with your dislike of the &quot;-&gt;&quot; proposal for much the same reason (hopefully the outcome of this should simplify things for programmers not introduce something new they have to think about - i.e. &quot;do I use the dot or the arrow here let me think hmmm). 

I guess the part I really wanted to comment on was that as I read your Field Access Example #2, I wondered if people would feel, as I do, that this has the static/dynamic language debate written all over it.

i.e.  I don&#039;t know java bytecode, but I&#039;m guessing it&#039;s safe to assume that as the java compiler creates the bytecode behind your two versions of the client code using the Payment class, the dollars field access bytecode will differ greatly from the setDollars method invocation call.

So in java the understanding of &quot;.splat&quot; is a compile time thing.  For &quot;.splat&quot; to be an abstraction like you (and I) want, the java compilers would have to emit bytecode that try and understand what &quot;splat&quot; is *at runtime*, or else *calling* code is going to have to be recompiled whenever someone makes the kind of change you made to your Payment class in Example 2.

So in a way, given that Java in my mind is a statically typed, performance focused language in the vein of C++, I could almost forgive the idea that this should properly wind up in the Groovy and JRuby kind of languages, and not Java. 

Because it seems a big change to think the compilers would be adding this kind of indirection for all the &quot;.&quot; references they find in the code, i.e. potentially a real performance drain given that the benefits might only apply in a small percentage of the time that &quot;.&quot; is used.</description>
		<content:encoded><![CDATA[<p>Have thought for some time Java was overdue for some &#8220;syntactic sugar&#8221; around properties.  I&#8217;ve recently been working with Objective-C which has an optional &#8220;@property&#8221; directive and dot syntax, yet otherwise it&#8217;s notion of properties as methods is much the same as javas under the covers.</p>
<p>And I agree with your dislike of the &#8220;-&gt;&#8221; proposal for much the same reason (hopefully the outcome of this should simplify things for programmers not introduce something new they have to think about &#8211; i.e. &#8220;do I use the dot or the arrow here let me think hmmm). </p>
<p>I guess the part I really wanted to comment on was that as I read your Field Access Example #2, I wondered if people would feel, as I do, that this has the static/dynamic language debate written all over it.</p>
<p>i.e.  I don&#8217;t know java bytecode, but I&#8217;m guessing it&#8217;s safe to assume that as the java compiler creates the bytecode behind your two versions of the client code using the Payment class, the dollars field access bytecode will differ greatly from the setDollars method invocation call.</p>
<p>So in java the understanding of &#8220;.splat&#8221; is a compile time thing.  For &#8220;.splat&#8221; to be an abstraction like you (and I) want, the java compilers would have to emit bytecode that try and understand what &#8220;splat&#8221; is *at runtime*, or else *calling* code is going to have to be recompiled whenever someone makes the kind of change you made to your Payment class in Example 2.</p>
<p>So in a way, given that Java in my mind is a statically typed, performance focused language in the vein of C++, I could almost forgive the idea that this should properly wind up in the Groovy and JRuby kind of languages, and not Java. </p>
<p>Because it seems a big change to think the compilers would be adding this kind of indirection for all the &#8220;.&#8221; references they find in the code, i.e. potentially a real performance drain given that the benefits might only apply in a small percentage of the time that &#8220;.&#8221; is used.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Miller - Java 7 Roundup (Dec 28th)</title>
		<link>http://tech.puredanger.com/2007/01/26/java7-property/comment-page-1/#comment-18932</link>
		<dc:creator>Alex Miller - Java 7 Roundup (Dec 28th)</dc:creator>
		<pubDate>Sat, 29 Dec 2007 04:03:01 +0000</pubDate>
		<guid isPermaLink="false">http://tech.puredanger.com/2007/01/26/java7-property/#comment-18932</guid>
		<description>[...] More info: Closures, Properties, Chained invocation [...]</description>
		<content:encoded><![CDATA[<p>[...] More info: Closures, Properties, Chained invocation [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Java 7 &#171; Quintincarlson&#8217;s Weblog</title>
		<link>http://tech.puredanger.com/2007/01/26/java7-property/comment-page-1/#comment-8307</link>
		<dc:creator>Java 7 &#171; Quintincarlson&#8217;s Weblog</dc:creator>
		<pubDate>Sat, 15 Sep 2007 13:36:30 +0000</pubDate>
		<guid isPermaLink="false">http://tech.puredanger.com/2007/01/26/java7-property/#comment-8307</guid>
		<description>[...] Now that Java is open source and all that, everyone is up for adding new features to the language that Sun never got around to adding. Things like named arguments, closures, and properties are what interest me most. Unfortunately, I find myself disagreeing with most of what is being said. Most of the ideas start with a fairly simple and easily overcome problem, a fairly complex solution, then begin tacking on as many “It would be cool if…” or “… just like Ruby” ideas as possible. [...]</description>
		<content:encoded><![CDATA[<p>[...] Now that Java is open source and all that, everyone is up for adding new features to the language that Sun never got around to adding. Things like named arguments, closures, and properties are what interest me most. Unfortunately, I find myself disagreeing with most of what is being said. Most of the ideas start with a fairly simple and easily overcome problem, a fairly complex solution, then begin tacking on as many “It would be cool if…” or “… just like Ruby” ideas as possible. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Java 7 &#171; Tales of the Sockmaster</title>
		<link>http://tech.puredanger.com/2007/01/26/java7-property/comment-page-1/#comment-7864</link>
		<dc:creator>Java 7 &#171; Tales of the Sockmaster</dc:creator>
		<pubDate>Sun, 09 Sep 2007 18:54:59 +0000</pubDate>
		<guid isPermaLink="false">http://tech.puredanger.com/2007/01/26/java7-property/#comment-7864</guid>
		<description>[...] Java&#160;7   Published September 9th, 2007   Uncategorized      Now that Java is open source and all that, everyone is up for adding new features to the language that Sun never got around to adding. Things like named arguments, closures, and properties are what interest me most. Unfortunately, I find myself disagreeing with most of what is being said. Most of the ideas start with a fairly simple and easily overcome problem, a fairly complex solution, then begin tacking on as many &#8220;It would be cool if&#8230;&#8221; or &#8220;&#8230; just like Ruby&#8221; ideas as possible. [...]</description>
		<content:encoded><![CDATA[<p>[...] Java&nbsp;7   Published September 9th, 2007   Uncategorized      Now that Java is open source and all that, everyone is up for adding new features to the language that Sun never got around to adding. Things like named arguments, closures, and properties are what interest me most. Unfortunately, I find myself disagreeing with most of what is being said. Most of the ideas start with a fairly simple and easily overcome problem, a fairly complex solution, then begin tacking on as many &#8220;It would be cool if&#8230;&#8221; or &#8220;&#8230; just like Ruby&#8221; ideas as possible. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Some comments on D&#38;R&#8217;s Java 7 wishlist</title>
		<link>http://tech.puredanger.com/2007/01/26/java7-property/comment-page-1/#comment-6254</link>
		<dc:creator>Some comments on D&#38;R&#8217;s Java 7 wishlist</dc:creator>
		<pubDate>Wed, 15 Aug 2007 15:13:40 +0000</pubDate>
		<guid isPermaLink="false">http://tech.puredanger.com/2007/01/26/java7-property/#comment-6254</guid>
		<description>[...] Properties - I think something around properties would be cool, but I haven&#8217;t seen a properties proposal that I&#8217;m excited about yet. I think in this case, the devil is in the details. I concur with Charles that defining it on interfaces would be nice. So here&#8217;s my reason not to have properties (I&#8217;ll take my chances that Charles won&#8217;t kill me): no implementation/proposal exists that doesn&#8217;t suck in some way. And perhaps more importantly, maybe a non-sucky properties proposal is not possible. I don&#8217;t know. If the actual implementation added properties but made the whole language more complicated as a result, then I don&#8217;t think it would be worth it. [...]</description>
		<content:encoded><![CDATA[<p>[...] Properties &#8211; I think something around properties would be cool, but I haven&#8217;t seen a properties proposal that I&#8217;m excited about yet. I think in this case, the devil is in the details. I concur with Charles that defining it on interfaces would be nice. So here&#8217;s my reason not to have properties (I&#8217;ll take my chances that Charles won&#8217;t kill me): no implementation/proposal exists that doesn&#8217;t suck in some way. And perhaps more importantly, maybe a non-sucky properties proposal is not possible. I don&#8217;t know. If the actual implementation added properties but made the whole language more complicated as a result, then I don&#8217;t think it would be worth it. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

