<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Trivial accessors and uniform access</title>
	<link>http://www.adambyrtek.net/2008/02/09/trivial-accessors-and-uniform-access/</link>
	<description>Skeptical Point of View</description>
	<pubDate>Wed, 19 Nov 2008 11:38:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>By: Marcin Kaszyński</title>
		<link>http://www.adambyrtek.net/2008/02/09/trivial-accessors-and-uniform-access/#comment-333</link>
		<dc:creator>Marcin Kaszyński</dc:creator>
		<pubDate>Sun, 30 Mar 2008 18:12:00 +0000</pubDate>
		<guid>http://www.adambyrtek.net/2008/02/09/trivial-accessors-and-uniform-access/#comment-333</guid>
		<description>There is a small bug in the Python version of Money: both getter and setter should use self._amount instead of self.amount.

What are the other problems with this approach?</description>
		<content:encoded><![CDATA[<p>There is a small bug in the Python version of Money: both getter and setter should use self._amount instead of self.amount.</p>
<p>What are the other problems with this approach?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomek Paczkowski</title>
		<link>http://www.adambyrtek.net/2008/02/09/trivial-accessors-and-uniform-access/#comment-7</link>
		<dc:creator>Tomek Paczkowski</dc:creator>
		<pubDate>Sat, 09 Feb 2008 19:39:29 +0000</pubDate>
		<guid>http://www.adambyrtek.net/2008/02/09/trivial-accessors-and-uniform-access/#comment-7</guid>
		<description>There is a good article about differences between Java and Python: &lt;a href="http://dirtsimple.org/2004/12/python-is-not-java.html" rel="nofollow"&gt; Python Is Not Java&lt;/a&gt; by Phillip J. Eby. It's surely reading-worth for Java programmers wanting to learn Python.</description>
		<content:encoded><![CDATA[<p>There is a good article about differences between Java and Python: <a href="http://dirtsimple.org/2004/12/python-is-not-java.html" rel="nofollow"> Python Is Not Java</a> by Phillip J. Eby. It&#8217;s surely reading-worth for Java programmers wanting to learn Python.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bartosz Bankowski</title>
		<link>http://www.adambyrtek.net/2008/02/09/trivial-accessors-and-uniform-access/#comment-6</link>
		<dc:creator>Bartosz Bankowski</dc:creator>
		<pubDate>Sat, 09 Feb 2008 19:07:05 +0000</pubDate>
		<guid>http://www.adambyrtek.net/2008/02/09/trivial-accessors-and-uniform-access/#comment-6</guid>
		<description>It was an interesting article for me, as I didn't know about the UAP before. However, I don't agree with your assumptions:

&#62; But in Java you have to introduce getters 
&#62; and setters from the very beginning, or it 
&#62; will bite you back in the future. It 
&#62; clearly contradicts with the DRY principle 
&#62; and a preference for evolutionary design, 
&#62; which discourages writing code that is 
&#62; useless right now, but may (or may not) 
&#62; be needed in the future.

You say that I have to create getters and setters from the very beginning, while
this is not true. I never do it. The very first time I create getter or setter is when I need to use it from my code.

Described behavior would not only be against the DRY rule, but also could lead to broken encapsulation.

&#62; The whole problem boils down to the fact 
&#62; that in Java you can’t apply the Uniform 
&#62; Access Principle

Which problem? From my point of view, the problem is not in a language, but in a design.</description>
		<content:encoded><![CDATA[<p>It was an interesting article for me, as I didn&#8217;t know about the UAP before. However, I don&#8217;t agree with your assumptions:</p>
<p>&gt; But in Java you have to introduce getters<br />
&gt; and setters from the very beginning, or it<br />
&gt; will bite you back in the future. It<br />
&gt; clearly contradicts with the DRY principle<br />
&gt; and a preference for evolutionary design,<br />
&gt; which discourages writing code that is<br />
&gt; useless right now, but may (or may not)<br />
&gt; be needed in the future.</p>
<p>You say that I have to create getters and setters from the very beginning, while<br />
this is not true. I never do it. The very first time I create getter or setter is when I need to use it from my code.</p>
<p>Described behavior would not only be against the DRY rule, but also could lead to broken encapsulation.</p>
<p>&gt; The whole problem boils down to the fact<br />
&gt; that in Java you can’t apply the Uniform<br />
&gt; Access Principle</p>
<p>Which problem? From my point of view, the problem is not in a language, but in a design.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: apohllo</title>
		<link>http://www.adambyrtek.net/2008/02/09/trivial-accessors-and-uniform-access/#comment-5</link>
		<dc:creator>apohllo</dc:creator>
		<pubDate>Sat, 09 Feb 2008 18:41:19 +0000</pubDate>
		<guid>http://www.adambyrtek.net/2008/02/09/trivial-accessors-and-uniform-access/#comment-5</guid>
		<description>In Ruby instance attributes are private, but... there are two methods, namely instance_variable_get and instance_variable_set, which are public and allow "unrestricted" access to instance variables. So I think in Ruby the UAP is fully supported, but you CAN break it.</description>
		<content:encoded><![CDATA[<p>In Ruby instance attributes are private, but&#8230; there are two methods, namely instance_variable_get and instance_variable_set, which are public and allow &#8220;unrestricted&#8221; access to instance variables. So I think in Ruby the UAP is fully supported, but you CAN break it.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
