<?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: Chain of Functions</title>
	<atom:link href="http://nodename.com/blog/2005/07/19/functionchain/feed/" rel="self" type="application/rss+xml" />
	<link>http://nodename.com/blog/2005/07/19/functionchain/</link>
	<description></description>
	<lastBuildDate>Sun, 22 Aug 2010 03:17:40 -0600</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Alan Shaw</title>
		<link>http://nodename.com/blog/2005/07/19/functionchain/comment-page-1/#comment-12</link>
		<dc:creator>Alan Shaw</dc:creator>
		<pubDate>Tue, 19 Jul 2005 22:03:45 +0000</pubDate>
		<guid isPermaLink="false">http://nodename.com/blog/?p=3#comment-12</guid>
		<description>Tony, I&#039;m not sure what you&#039;re referring to as the wrapping class or the child item, so I may be mistaking your meaning, but I believe you&#039;re criticizing only one thing: the ability to dynamically alter a member function of an object.  As you know, I&#039;m not providing that; it&#039;s there in ActionScript already.  But yes, it does raise some concerns, as you yourself wrote about just today in your post &lt;a href=&quot;http://teknision.blogspot.com/2005/07/delegatesbe-careful.html&quot;&gt;Delegates, be careful...&lt;/a&gt;. I&#039;ll summarize if I may: First, you show that Delegate.create(someObject, someFunction) is inherently dangerous for the very reason that &quot;if for some reason someFunction is overwritten at runtime (which is common in AS) then your delegate no longer refers to the correct function.&quot;  So the Delegate would then not work correctly, and furthermore it would waste memory because the old version of someFunction would have been garbage-collected if your Delegate wasn&#039;t still holding a reference to it.  You propose a version of Delegate that uses a String name of the function rather than a Function reference.  This will always resolve to the current version of the member function.  Sounds good to me.  (A little slower, though, I expect.)
&lt;br /&gt;
(Then you speak about potential problems Delegate can cause in the EventDispatcher context -- also quite interesting, but I don&#039;t think dynamic functions is relevant to that.)
&lt;br /&gt;
But I thought your complaint in your blog was not with dynamic assignment of functions -- that&#039;s a given in ActionScript -- but with the implementation of Delegate in such an environment.  Or as my uncle used to say about crossing the street in New York City, &quot;You got to be careful.&quot;
&lt;br /&gt;
Is there some way my FunctionChain makes the problem worse?</description>
		<content:encoded><![CDATA[<p>Tony, I&#8217;m not sure what you&#8217;re referring to as the wrapping class or the child item, so I may be mistaking your meaning, but I believe you&#8217;re criticizing only one thing: the ability to dynamically alter a member function of an object.  As you know, I&#8217;m not providing that; it&#8217;s there in ActionScript already.  But yes, it does raise some concerns, as you yourself wrote about just today in your post <a href="http://teknision.blogspot.com/2005/07/delegatesbe-careful.html">Delegates, be careful&#8230;</a>. I&#8217;ll summarize if I may: First, you show that Delegate.create(someObject, someFunction) is inherently dangerous for the very reason that &#34;if for some reason someFunction is overwritten at runtime (which is common in AS) then your delegate no longer refers to the correct function.&#34;  So the Delegate would then not work correctly, and furthermore it would waste memory because the old version of someFunction would have been garbage-collected if your Delegate wasn&#8217;t still holding a reference to it.  You propose a version of Delegate that uses a String name of the function rather than a Function reference.  This will always resolve to the current version of the member function.  Sounds good to me.  (A little slower, though, I expect.)<br />
<br />
(Then you speak about potential problems Delegate can cause in the EventDispatcher context &#8212; also quite interesting, but I don&#8217;t think dynamic functions is relevant to that.)<br />
<br />
But I thought your complaint in your blog was not with dynamic assignment of functions &#8212; that&#8217;s a given in ActionScript &#8212; but with the implementation of Delegate in such an environment.  Or as my uncle used to say about crossing the street in New York City, &#34;You got to be careful.&#34;<br />
<br />
Is there some way my FunctionChain makes the problem worse?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tony MacDonell</title>
		<link>http://nodename.com/blog/2005/07/19/functionchain/comment-page-1/#comment-11</link>
		<dc:creator>Tony MacDonell</dc:creator>
		<pubDate>Tue, 19 Jul 2005 16:58:04 +0000</pubDate>
		<guid isPermaLink="false">http://nodename.com/blog/?p=3#comment-11</guid>
		<description>Even though this is a neat class, I question the type of architectural patterns that it&#039;s usage will lead to.

It is neat to be able to simulate/reformat a function at runtime, but here&#039;s the issues I see arising:

1/ Readability of code.

If this was used extensively in a project, following the bootstrapping of the code becomes extremely difficult. In large OO projects it can sometimes be difficult anyways, but this adds yet another level of abstraction at the class level.

To me it seems as though you are trying to deprecate the idea of a class level method with this, and that is something that architecturally is very dangerous as it is a fundamental aspect of OOP.

The wrapping class owns the task that the child item&#039;s onRelease method is triggering, and a Delegate or Proxy should be there for the sole purpose of sending notification of that event.

Using your class you are breaking down that ownership to the point that you invalidate the wrapping class&#039;s presence in the architecture. It does not own the process anymore, an abstract object does instead.



2/ Inheritance, Sublassing and overwriting tossed out the window.

If one was to again use this extensively in a project, Subclassing would become a nightmare. The fact that you are trying to make dynamic methods means that classes that utilize this would be nearly impossible to subclass.



Just some thoughts and criticisms, but I do see it&#039;s cool factor though.</description>
		<content:encoded><![CDATA[<p>Even though this is a neat class, I question the type of architectural patterns that it&#8217;s usage will lead to.</p>
<p>It is neat to be able to simulate/reformat a function at runtime, but here&#8217;s the issues I see arising:</p>
<p>1/ Readability of code.</p>
<p>If this was used extensively in a project, following the bootstrapping of the code becomes extremely difficult. In large OO projects it can sometimes be difficult anyways, but this adds yet another level of abstraction at the class level.</p>
<p>To me it seems as though you are trying to deprecate the idea of a class level method with this, and that is something that architecturally is very dangerous as it is a fundamental aspect of OOP.</p>
<p>The wrapping class owns the task that the child item&#8217;s onRelease method is triggering, and a Delegate or Proxy should be there for the sole purpose of sending notification of that event.</p>
<p>Using your class you are breaking down that ownership to the point that you invalidate the wrapping class&#8217;s presence in the architecture. It does not own the process anymore, an abstract object does instead.</p>
<p>2/ Inheritance, Sublassing and overwriting tossed out the window.</p>
<p>If one was to again use this extensively in a project, Subclassing would become a nightmare. The fact that you are trying to make dynamic methods means that classes that utilize this would be nearly impossible to subclass.</p>
<p>Just some thoughts and criticisms, but I do see it&#8217;s cool factor though.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
