<?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: Advanced ActionScript Refactoring &#8211; Step 1</title>
	<atom:link href="http://kuwamoto.org/2007/05/15/making-the-world-better-via-refactoring-step-1/feed/" rel="self" type="application/rss+xml" />
	<link>http://kuwamoto.org/2007/05/15/making-the-world-better-via-refactoring-step-1/</link>
	<description>various stuff, mostly boring</description>
	<lastBuildDate>Mon, 14 May 2012 23:53:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: 小薛部落格 &#187; Blog Archive &#187; [翻譯]ActionScript重構三部曲之一(Advanced ActionScript Refactoring - Step 1)</title>
		<link>http://kuwamoto.org/2007/05/15/making-the-world-better-via-refactoring-step-1/comment-page-1/#comment-118429</link>
		<dc:creator>小薛部落格 &#187; Blog Archive &#187; [翻譯]ActionScript重構三部曲之一(Advanced ActionScript Refactoring - Step 1)</dc:creator>
		<pubDate>Tue, 22 Jan 2008 10:53:03 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/2007/05/15/making-the-world-better-via-refactoring-step-1/#comment-118429</guid>
		<description>[...] [翻譯]ActionScript重構三部曲之一(Advanced ActionScript Refactoring - Step 1)  這些文章翻譯自Sho Kuwamoto的ActionScript Refactoring 三部曲，經過原作者同意翻譯之。 本文原文連結在此。 [...]</description>
		<content:encoded><![CDATA[<p>[...] [翻譯]ActionScript重構三部曲之一(Advanced ActionScript Refactoring &#8211; Step 1)  這些文章翻譯自Sho Kuwamoto的ActionScript Refactoring 三部曲，經過原作者同意翻譯之。 本文原文連結在此。 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Refactoring or &#8220;making world better&#8221; &#124;</title>
		<link>http://kuwamoto.org/2007/05/15/making-the-world-better-via-refactoring-step-1/comment-page-1/#comment-39119</link>
		<dc:creator>Refactoring or &#8220;making world better&#8221; &#124;</dc:creator>
		<pubDate>Wed, 11 Jul 2007 06:41:27 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/2007/05/15/making-the-world-better-via-refactoring-step-1/#comment-39119</guid>
		<description>[...] Advanced ActionScript Refactoring - Step 1 [...]</description>
		<content:encoded><![CDATA[<p>[...] Advanced ActionScript Refactoring &#8211; Step 1 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ruben Swieringa</title>
		<link>http://kuwamoto.org/2007/05/15/making-the-world-better-via-refactoring-step-1/comment-page-1/#comment-26866</link>
		<dc:creator>Ruben Swieringa</dc:creator>
		<pubDate>Thu, 24 May 2007 10:08:09 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/2007/05/15/making-the-world-better-via-refactoring-step-1/#comment-26866</guid>
		<description>Sho, that is an interesting point. Normally I would create a protected internal var and a public accessor for outside classes to access.
However, while reading your comment it occured to me that when creating a protected accessor for a subclass to access, the private attribute might actually have some use (for marking the internal var).

This is actually the first situation in which I would prefer private over protected.

Having said that, I still think I like protected better for all other situations. In my opinion, the habit of making your vars private (instead of protected) totally ruins the opportunity for other programmers (and yourself, for that matter) to extend your classes.
This why I feel extending some of the more complicated AS3 Flex classes is a horrible (if not near impossible) task to do.</description>
		<content:encoded><![CDATA[<p>Sho, that is an interesting point. Normally I would create a protected internal var and a public accessor for outside classes to access.<br />
However, while reading your comment it occured to me that when creating a protected accessor for a subclass to access, the private attribute might actually have some use (for marking the internal var).</p>
<p>This is actually the first situation in which I would prefer private over protected.</p>
<p>Having said that, I still think I like protected better for all other situations. In my opinion, the habit of making your vars private (instead of protected) totally ruins the opportunity for other programmers (and yourself, for that matter) to extend your classes.<br />
This why I feel extending some of the more complicated AS3 Flex classes is a horrible (if not near impossible) task to do.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sho</title>
		<link>http://kuwamoto.org/2007/05/15/making-the-world-better-via-refactoring-step-1/comment-page-1/#comment-26724</link>
		<dc:creator>sho</dc:creator>
		<pubDate>Wed, 23 May 2007 15:15:13 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/2007/05/15/making-the-world-better-via-refactoring-step-1/#comment-26724</guid>
		<description>Thanks for the thoughts, Ruben. You&#039;re absolutely right. Making a variable protected is, by definition, a way to give permission to subclasses a chance to use the variable.

What I meant to say is that before you decide to make a variable protected, you should think about whether it would be better to leave it private and provide a different way for the subclass to access the information. 

In this case, exposing dragTargetIdx as a protected variable is arguably the wrong thing. It is a very specific implementation detail of how drag and drop was implemented by the superclass, and you may want to change this in the future. The &quot;right&quot; way to factor this is to make the variable private and to give the subclass some other way of getting the information. (for example, by passing the drag target index into a drag handler function as an argument).</description>
		<content:encoded><![CDATA[<p>Thanks for the thoughts, Ruben. You&#8217;re absolutely right. Making a variable protected is, by definition, a way to give permission to subclasses a chance to use the variable.</p>
<p>What I meant to say is that before you decide to make a variable protected, you should think about whether it would be better to leave it private and provide a different way for the subclass to access the information. </p>
<p>In this case, exposing dragTargetIdx as a protected variable is arguably the wrong thing. It is a very specific implementation detail of how drag and drop was implemented by the superclass, and you may want to change this in the future. The &#8220;right&#8221; way to factor this is to make the variable private and to give the subclass some other way of getting the information. (for example, by passing the drag target index into a drag handler function as an argument).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ruben Swieringa</title>
		<link>http://kuwamoto.org/2007/05/15/making-the-world-better-via-refactoring-step-1/comment-page-1/#comment-26723</link>
		<dc:creator>Ruben Swieringa</dc:creator>
		<pubDate>Wed, 23 May 2007 14:54:50 +0000</pubDate>
		<guid isPermaLink="false">http://kuwamoto.org/2007/05/15/making-the-world-better-via-refactoring-step-1/#comment-26723</guid>
		<description>&lt;em&gt;&quot;...making a private member protected requires some thought. Is this the right way for a subclass to get information from its superclass? In this case, it’s probably not the right thing.&quot;&lt;/em&gt;

What&#039;s wrong with letting a subclass use a protected var belonging to its superclass? I&#039;m kind of curious as I don&#039;t really see the use of protected members if you shouldn&#039;t let subclasses use them (since that&#039;s in my opinion the only difference between private and protected)..</description>
		<content:encoded><![CDATA[<p><em>&#8220;&#8230;making a private member protected requires some thought. Is this the right way for a subclass to get information from its superclass? In this case, it’s probably not the right thing.&#8221;</em></p>
<p>What&#8217;s wrong with letting a subclass use a protected var belonging to its superclass? I&#8217;m kind of curious as I don&#8217;t really see the use of protected members if you shouldn&#8217;t let subclasses use them (since that&#8217;s in my opinion the only difference between private and protected)..</p>
]]></content:encoded>
	</item>
</channel>
</rss>

