<?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: Comparison of JavaScript Inheritance Mechanisms; Proposal</title>
	<atom:link href="http://ajaxian.com/archives/comparison-of-javascript-inheritance-mechanisms-proposal/feed" rel="self" type="application/rss+xml" />
	<link>http://ajaxian.com/archives/comparison-of-javascript-inheritance-mechanisms-proposal</link>
	<description>Cleaning up the web with Ajax</description>
	<lastBuildDate>Sun, 21 Mar 2010 02:12:15 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Covex</title>
		<link>http://ajaxian.com/archives/comparison-of-javascript-inheritance-mechanisms-proposal/comment-page-1#comment-271612</link>
		<dc:creator>Covex</dc:creator>
		<pubDate>Wed, 25 Feb 2009 10:25:19 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=6052#comment-271612</guid>
		<description>I found 2 bugs:&lt;blockquote&gt;&lt;code&gt;var wr_Root = wr.extend(
  function() { alert(&quot;wr_Root&quot;); }, {
    Method0: function() { alert(&quot;Method0&quot;); }, 
    Method1: function() { alert(&quot;Method1&quot;); }, 
    Method2: function() { alert(&quot;Method2&quot;); }, 
    Method3: function() { alert(&quot;Method3&quot;); }
  });
var wr_Class1 = wr.extend(
  function() {
  },
  wr_Root, {
    Method0: function() {
      this.Method1();
      this.parent(); // alerts &quot;wr_Root&quot; (&quot;Method0&quot; expected, simple to fix)
      this.Method2();
    }, 
    Method1: function() {
      this.parent();
    }, 
    Method2: function() {
      try {
        this.Method3();
      }
      catch (e) {};
      this.parent(); // alerts &quot;Method3&quot; (&quot;Method2&quot; expected)
    }, 
    Method3: function() {
      throw new Error(&quot;hard to fix =(&quot;);
    }
  });
var Obj1 = new wr_Class1();
Obj1.Method0();&lt;/code&gt;&lt;/blockquote&gt;I&#039;m just trying to find bugs in my own code, but they emerge only after I study and test similar code writen by someone else =)</description>
		<content:encoded><![CDATA[<p>I found 2 bugs:<br />
<blockquote><code>var wr_Root = wr.extend(<br />
  function() { alert("wr_Root"); }, {<br />
    Method0: function() { alert("Method0"); },<br />
    Method1: function() { alert("Method1"); },<br />
    Method2: function() { alert("Method2"); },<br />
    Method3: function() { alert("Method3"); }<br />
  });<br />
var wr_Class1 = wr.extend(<br />
  function() {<br />
  },<br />
  wr_Root, {<br />
    Method0: function() {<br />
      this.Method1();<br />
      this.parent(); // alerts "wr_Root" ("Method0" expected, simple to fix)<br />
      this.Method2();<br />
    },<br />
    Method1: function() {<br />
      this.parent();<br />
    },<br />
    Method2: function() {<br />
      try {<br />
        this.Method3();<br />
      }<br />
      catch (e) {};<br />
      this.parent(); // alerts "Method3" ("Method2" expected)<br />
    },<br />
    Method3: function() {<br />
      throw new Error("hard to fix =(");<br />
    }<br />
  });<br />
var Obj1 = new wr_Class1();<br />
Obj1.Method0();</code></p></blockquote>
<p>I&#8217;m just trying to find bugs in my own code, but they emerge only after I study and test similar code writen by someone else =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ywg</title>
		<link>http://ajaxian.com/archives/comparison-of-javascript-inheritance-mechanisms-proposal/comment-page-1#comment-271535</link>
		<dc:creator>ywg</dc:creator>
		<pubDate>Sun, 22 Feb 2009 17:09:16 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=6052#comment-271535</guid>
		<description>I&#039;m very suspicious when posting on blogs... Sadly this kind of &quot;incidents&quot; have happened to me many times.

As it was not your intention, please accept my apologizes.</description>
		<content:encoded><![CDATA[<p>I&#8217;m very suspicious when posting on blogs&#8230; Sadly this kind of &#8220;incidents&#8221; have happened to me many times.</p>
<p>As it was not your intention, please accept my apologizes.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WebReflection</title>
		<link>http://ajaxian.com/archives/comparison-of-javascript-inheritance-mechanisms-proposal/comment-page-1#comment-271534</link>
		<dc:creator>WebReflection</dc:creator>
		<pubDate>Sun, 22 Feb 2009 16:18:03 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=6052#comment-271534</guid>
		<description>ywg ... first of all it is sunday, I am not spending the entire day moderating comments. Secondly, your one was hidden by kangax one in my gmail account. As soon as I spotted it I published, you can check it.
I published this one as well, so you can stop to blame me for something I have never done in my blog. Regards</description>
		<content:encoded><![CDATA[<p>ywg &#8230; first of all it is sunday, I am not spending the entire day moderating comments. Secondly, your one was hidden by kangax one in my gmail account. As soon as I spotted it I published, you can check it.<br />
I published this one as well, so you can stop to blame me for something I have never done in my blog. Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ywg</title>
		<link>http://ajaxian.com/archives/comparison-of-javascript-inheritance-mechanisms-proposal/comment-page-1#comment-271533</link>
		<dc:creator>ywg</dc:creator>
		<pubDate>Sun, 22 Feb 2009 15:13:34 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=6052#comment-271533</guid>
		<description>@Andrea/WebReflection &#039;So I am sorry, but I am still asking you to demonstrate that for Huffman based compressors, dictionary length is not important&#039;

I&#039;m very disappointed, I took the time to write you an argumented reply showing how biased and irrevelant your demonstration is. You choosed not to publish it and instead write this comment pretending I didn&#039;t provided any argument.

This is very childish... continue to truncate people post so you can look like you&#039;re right on your own blog.</description>
		<content:encoded><![CDATA[<p>@Andrea/WebReflection &#8216;So I am sorry, but I am still asking you to demonstrate that for Huffman based compressors, dictionary length is not important&#8217;</p>
<p>I&#8217;m very disappointed, I took the time to write you an argumented reply showing how biased and irrevelant your demonstration is. You choosed not to publish it and instead write this comment pretending I didn&#8217;t provided any argument.</p>
<p>This is very childish&#8230; continue to truncate people post so you can look like you&#8217;re right on your own blog.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WebReflection</title>
		<link>http://ajaxian.com/archives/comparison-of-javascript-inheritance-mechanisms-proposal/comment-page-1#comment-271528</link>
		<dc:creator>WebReflection</dc:creator>
		<pubDate>Sat, 21 Feb 2009 14:22:34 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=6052#comment-271528</guid>
		<description>Here I am with a &lt;a href=&quot;http://webreflection.blogspot.com/2009/02/on-my-vicious-javascript-code.html&quot; rel=&quot;nofollow&quot;&gt;better explanation of my vicious code&lt;/a&gt;. I hope you&#039;ll understand better some personal choice while I am writing bits and bops (specially since these bits and bops could be easily implemented in every other library for cost &quot;zero&quot;).
Best Regards</description>
		<content:encoded><![CDATA[<p>Here I am with a <a href="http://webreflection.blogspot.com/2009/02/on-my-vicious-javascript-code.html" rel="nofollow">better explanation of my vicious code</a>. I hope you&#8217;ll understand better some personal choice while I am writing bits and bops (specially since these bits and bops could be easily implemented in every other library for cost &#8220;zero&#8221;).<br />
Best Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WebReflection</title>
		<link>http://ajaxian.com/archives/comparison-of-javascript-inheritance-mechanisms-proposal/comment-page-1#comment-271527</link>
		<dc:creator>WebReflection</dc:creator>
		<pubDate>Sat, 21 Feb 2009 11:34:12 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=6052#comment-271527</guid>
		<description>more reliable means I changed that typeof with an Object.prototype.toString.call(whatever) === &quot;[object Function]&quot; :-)
I&#039;ll try to write down today more about my vicious code so you can understand better and make your considerations (if interested).
Have a nice WE</description>
		<content:encoded><![CDATA[<p>more reliable means I changed that typeof with an Object.prototype.toString.call(whatever) === &#8220;[object Function]&#8221; :-)<br />
I&#8217;ll try to write down today more about my vicious code so you can understand better and make your considerations (if interested).<br />
Have a nice WE</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kangax</title>
		<link>http://ajaxian.com/archives/comparison-of-javascript-inheritance-mechanisms-proposal/comment-page-1#comment-271523</link>
		<dc:creator>kangax</dc:creator>
		<pubDate>Sat, 21 Feb 2009 03:28:32 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=6052#comment-271523</guid>
		<description>&lt;cite&gt;
    I do not usually pass global constructor, since if I do not need them, I wonder why I should leave that “word in the dictionary” alone when I can use it in a meaningfully way (but this is part of my post that I will write soon!)
&lt;/cite&gt;

No, you&#039;re not passing them into functions, but you use them &lt;strong&gt;in&lt;/strong&gt; functions and when you do so, a reader needs to see whether the identifier resolves to some locally-defined variable, or if it is indeed a global constructor. The fact that &quot;Object&quot; is a global constructor is exactly why you shouldn&#039;t use that &quot;word in a dictionary&quot; ;)

&lt;cite&gt;
    JavaScript allows us to do stuff like {a:1,b:2}[arguments[0]]
    I wonder if a superficial lecture of the code could be that helpful to make code specifications useless … I generally agree with you and Micheaux but “for 10 lines code” I do not think this is that big deal.
&lt;/cite&gt;

Those were a bit more than 10 lines : ) Besides, being consistent is good. When you look at the code line-by-line, it is much easier to spot self-executing function if it is wrapped in parenthesis. Do those 2 characters really matter to you? Come on, don&#039;t we have minification/caching these days?

&lt;cite&gt;
    Whatever does Prototype library does not matter for this basic analysis about inheritance … I got on purpose a single weird case and I proposed/analyzed it for some common library. Every library has pros and cons, this is just a single stone in the ocean of possibilities each library offers for daily usage/development, unused toLocaleCase or not.
&lt;/cite&gt;

I understand. Not many libraries take care of DontEnum bug fully, and taking care of most of the `Object.prototype.*` properties can be considered an edge case (aside from toString/valueOf). Prototype.js, also does &quot;DontEnum&quot; test in not most efficient matter - i.e. every time a &quot;class&quot; is created. (disclaimer: I&#039;m one of Prototype.js developers)

&lt;cite&gt;
    Honestly your version is probably more reliable (I cannot update my repository right now since the main hoster is maintaining) but is longer and in my opinion more complicated to understand (less linear)
&lt;/cite&gt;

More reliable? Could you clarify?

&lt;cite&gt;
    At the same time, an array of method names (strings) than cannot contain a dot in the middle, is worthless in my opinion, since for compressors and simplicity I still think that “a.b.c”.split(”.”) is both more simple to maintain and bandwidth saver.
&lt;/cite&gt;

Agreed. dot-separated string looks pretty clean and is easy to maintain.</description>
		<content:encoded><![CDATA[<p><cite><br />
    I do not usually pass global constructor, since if I do not need them, I wonder why I should leave that “word in the dictionary” alone when I can use it in a meaningfully way (but this is part of my post that I will write soon!)<br />
</cite></p>
<p>No, you&#8217;re not passing them into functions, but you use them <strong>in</strong> functions and when you do so, a reader needs to see whether the identifier resolves to some locally-defined variable, or if it is indeed a global constructor. The fact that &#8220;Object&#8221; is a global constructor is exactly why you shouldn&#8217;t use that &#8220;word in a dictionary&#8221; ;)</p>
<p><cite><br />
    JavaScript allows us to do stuff like {a:1,b:2}[arguments[0]]<br />
    I wonder if a superficial lecture of the code could be that helpful to make code specifications useless … I generally agree with you and Micheaux but “for 10 lines code” I do not think this is that big deal.<br />
</cite></p>
<p>Those were a bit more than 10 lines : ) Besides, being consistent is good. When you look at the code line-by-line, it is much easier to spot self-executing function if it is wrapped in parenthesis. Do those 2 characters really matter to you? Come on, don&#8217;t we have minification/caching these days?</p>
<p><cite><br />
    Whatever does Prototype library does not matter for this basic analysis about inheritance … I got on purpose a single weird case and I proposed/analyzed it for some common library. Every library has pros and cons, this is just a single stone in the ocean of possibilities each library offers for daily usage/development, unused toLocaleCase or not.<br />
</cite></p>
<p>I understand. Not many libraries take care of DontEnum bug fully, and taking care of most of the `Object.prototype.*` properties can be considered an edge case (aside from toString/valueOf). Prototype.js, also does &#8220;DontEnum&#8221; test in not most efficient matter &#8211; i.e. every time a &#8220;class&#8221; is created. (disclaimer: I&#8217;m one of Prototype.js developers)</p>
<p><cite><br />
    Honestly your version is probably more reliable (I cannot update my repository right now since the main hoster is maintaining) but is longer and in my opinion more complicated to understand (less linear)<br />
</cite></p>
<p>More reliable? Could you clarify?</p>
<p><cite><br />
    At the same time, an array of method names (strings) than cannot contain a dot in the middle, is worthless in my opinion, since for compressors and simplicity I still think that “a.b.c”.split(”.”) is both more simple to maintain and bandwidth saver.<br />
</cite></p>
<p>Agreed. dot-separated string looks pretty clean and is easy to maintain.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WebReflection</title>
		<link>http://ajaxian.com/archives/comparison-of-javascript-inheritance-mechanisms-proposal/comment-page-1#comment-271519</link>
		<dc:creator>WebReflection</dc:creator>
		<pubDate>Fri, 20 Feb 2009 21:22:27 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=6052#comment-271519</guid>
		<description>&gt; When I see an identifier named `Function`, I think of a global native `Function` constructor (not the local variable)
I do not usually pass global constructor, since if I do not need them, I wonder why I should leave that &quot;word in the dictionary&quot; alone when I can use it in a meaningfully way (but this is part of my post that I will write soon!)

&gt; Parenthesis are not necessary, but ...
JavaScript allows us to do stuff like {a:1,b:2}[arguments[0]]
I wonder if a superficial lecture of the code could be that helpful to make code specifications useless ... I generally agree with you and Micheaux but &quot;for 10 lines code&quot; I do not think this is that big deal.

Whatever does Prototype library does not matter for this basic analysis about inheritance ... I got on purpose a single weird case and I proposed/analyzed it for some common library. Every library has pros and cons, this is just a single stone in the ocean of possibilities each library offers for daily usage/development, unused toLocaleCase or not.

&gt; The reason I modified your implementation was to make it readable

Honestly your version is probably more reliable (I cannot update my repository right now since the main hoster is maintaining) but is longer and in my opinion more complicated to understand (less linear)

At the same time, an array of method names (strings) than cannot contain a dot in the middle, is worthless in my opinion, since for compressors and simplicity I still think that &quot;a.b.c&quot;.split(&quot;.&quot;) is both more simple to maintain and bandwidth saver.

After all our concerns, there is still the style and thanks Lord we are not machines and we like to code in our way as long as we can understand our code (it took half an hour but you understood everything, same is for me if I read your code style compared to mine)

Finally, how much could we complain for a multiple scope library since we should read the full code instead of a single line?
{toString:function(){return&quot;Regards :D&quot;}}</description>
		<content:encoded><![CDATA[<p>&gt; When I see an identifier named `Function`, I think of a global native `Function` constructor (not the local variable)<br />
I do not usually pass global constructor, since if I do not need them, I wonder why I should leave that &#8220;word in the dictionary&#8221; alone when I can use it in a meaningfully way (but this is part of my post that I will write soon!)</p>
<p>&gt; Parenthesis are not necessary, but &#8230;<br />
JavaScript allows us to do stuff like {a:1,b:2}[arguments[0]]<br />
I wonder if a superficial lecture of the code could be that helpful to make code specifications useless &#8230; I generally agree with you and Micheaux but &#8220;for 10 lines code&#8221; I do not think this is that big deal.</p>
<p>Whatever does Prototype library does not matter for this basic analysis about inheritance &#8230; I got on purpose a single weird case and I proposed/analyzed it for some common library. Every library has pros and cons, this is just a single stone in the ocean of possibilities each library offers for daily usage/development, unused toLocaleCase or not.</p>
<p>&gt; The reason I modified your implementation was to make it readable</p>
<p>Honestly your version is probably more reliable (I cannot update my repository right now since the main hoster is maintaining) but is longer and in my opinion more complicated to understand (less linear)</p>
<p>At the same time, an array of method names (strings) than cannot contain a dot in the middle, is worthless in my opinion, since for compressors and simplicity I still think that &#8220;a.b.c&#8221;.split(&#8221;.&#8221;) is both more simple to maintain and bandwidth saver.</p>
<p>After all our concerns, there is still the style and thanks Lord we are not machines and we like to code in our way as long as we can understand our code (it took half an hour but you understood everything, same is for me if I read your code style compared to mine)</p>
<p>Finally, how much could we complain for a multiple scope library since we should read the full code instead of a single line?<br />
{toString:function(){return&#8221;Regards :D&#8221;}}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kangax</title>
		<link>http://ajaxian.com/archives/comparison-of-javascript-inheritance-mechanisms-proposal/comment-page-1#comment-271518</link>
		<dc:creator>kangax</dc:creator>
		<pubDate>Fri, 20 Feb 2009 20:57:17 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=6052#comment-271518</guid>
		<description>@WebReflection
&gt; I will write a post my vicious coding style because reasons are more than one but please do not tell me that if you expect a Function, and an Object, as arguments, you cannot understand the meaning of a variable called Function, and another one called Object …

When I see an identifier named `Function`, I think of a global native `Function` constructor (not the local variable). Every time I see `Object` or `Function` in &lt;strong&gt;your&lt;/strong&gt; code, I need to scan to the beginning of the function, to remind myself whether this is a local variable or it is actually a global constructor. But just to make things even &quot;easier&quot; for me, you also like to put &quot;beginning&quot; of the function in the end of the entire code (when passing it, say, to the self-executing function - the one that&#039;s without parenthesis). I end up scanning your snippet back and forth, trying to figure out things that should be obvious, instead of focusing on the actual idea/implementation : )

Parenthesis are not necessary, but they make it easier to understand that a function you&#039;re looking at (which can be quite lengthy) is not being &lt;strong&gt;just&lt;/strong&gt; declared, but is also executed. I think Micheaux wrote about this issue some time ago (so I&#039;m not alone with this argument)

If you want someone to comment on your code, don&#039;t you want to make it easier for that &quot;someone&quot; to be able to first read/understand what that code does?

&gt; Overrides against obtrusive arguments … uhm, if I do not want to override I use the YUI strategy because for sure I cannot change every function definition, mine or not mine, because a library unshift arguments to send the original one. That is why I defined Prototype implementation the most obtrusive ever.

Prototype.js also relies on function decompilation and that&#039;s not a good thing.

&gt; When your version (and my updated one) will be finished, we can compare speed and code size (gzipped/packed as well) ok?

I don&#039;t really have intentions to &quot;work&quot; on my version or compete with yours. The reason I modified your implementation was to make it readable and remove unnecessary object creation during every constructor invocation (when testing for DontEnum bug). Did it not bother you?</description>
		<content:encoded><![CDATA[<p>@WebReflection<br />
&gt; I will write a post my vicious coding style because reasons are more than one but please do not tell me that if you expect a Function, and an Object, as arguments, you cannot understand the meaning of a variable called Function, and another one called Object …</p>
<p>When I see an identifier named `Function`, I think of a global native `Function` constructor (not the local variable). Every time I see `Object` or `Function` in <strong>your</strong> code, I need to scan to the beginning of the function, to remind myself whether this is a local variable or it is actually a global constructor. But just to make things even &#8220;easier&#8221; for me, you also like to put &#8220;beginning&#8221; of the function in the end of the entire code (when passing it, say, to the self-executing function &#8211; the one that&#8217;s without parenthesis). I end up scanning your snippet back and forth, trying to figure out things that should be obvious, instead of focusing on the actual idea/implementation : )</p>
<p>Parenthesis are not necessary, but they make it easier to understand that a function you&#8217;re looking at (which can be quite lengthy) is not being <strong>just</strong> declared, but is also executed. I think Micheaux wrote about this issue some time ago (so I&#8217;m not alone with this argument)</p>
<p>If you want someone to comment on your code, don&#8217;t you want to make it easier for that &#8220;someone&#8221; to be able to first read/understand what that code does?</p>
<p>&gt; Overrides against obtrusive arguments … uhm, if I do not want to override I use the YUI strategy because for sure I cannot change every function definition, mine or not mine, because a library unshift arguments to send the original one. That is why I defined Prototype implementation the most obtrusive ever.</p>
<p>Prototype.js also relies on function decompilation and that&#8217;s not a good thing.</p>
<p>&gt; When your version (and my updated one) will be finished, we can compare speed and code size (gzipped/packed as well) ok?</p>
<p>I don&#8217;t really have intentions to &#8220;work&#8221; on my version or compete with yours. The reason I modified your implementation was to make it readable and remove unnecessary object creation during every constructor invocation (when testing for DontEnum bug). Did it not bother you?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WebReflection</title>
		<link>http://ajaxian.com/archives/comparison-of-javascript-inheritance-mechanisms-proposal/comment-page-1#comment-271517</link>
		<dc:creator>WebReflection</dc:creator>
		<pubDate>Fri, 20 Feb 2009 19:47:46 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=6052#comment-271517</guid>
		<description>Hi Kangax.
I will write a post my vicious coding style because reasons are more than one but please do not tell me that if you expect a Function, and an Object, as arguments, you cannot understand the meaning of a variable called Function, and another one called Object ...

Parenthesis around self executed functions are not necessary when the function returns whatever value and as far as I know you are byte maniac as I am, aren&#039;t you?

Overrides against obtrusive arguments ... uhm, if I do not want to override I use the YUI strategy because for sure I cannot change every function definition, mine or not mine, because a library unshift arguments to send the original one. That is why I defined Prototype implementation the most obtrusive ever.

typeof function could be removed without problems and thanks for the tip while for your super fast implementation, as long as you use &quot;my 4 step parent call&quot; I strongly doubt your one will be faster (what I mean is that if you call a variable fn instead of Function do not expect better performances, whatever surrounds that function assignment).

When your version (and my updated one) will be finished, we can compare speed and code size (gzipped/packed as well) ok?

I am looking forward for the next challenge (and for comments like your as well)

Best Regards :-)</description>
		<content:encoded><![CDATA[<p>Hi Kangax.<br />
I will write a post my vicious coding style because reasons are more than one but please do not tell me that if you expect a Function, and an Object, as arguments, you cannot understand the meaning of a variable called Function, and another one called Object &#8230;</p>
<p>Parenthesis around self executed functions are not necessary when the function returns whatever value and as far as I know you are byte maniac as I am, aren&#8217;t you?</p>
<p>Overrides against obtrusive arguments &#8230; uhm, if I do not want to override I use the YUI strategy because for sure I cannot change every function definition, mine or not mine, because a library unshift arguments to send the original one. That is why I defined Prototype implementation the most obtrusive ever.</p>
<p>typeof function could be removed without problems and thanks for the tip while for your super fast implementation, as long as you use &#8220;my 4 step parent call&#8221; I strongly doubt your one will be faster (what I mean is that if you call a variable fn instead of Function do not expect better performances, whatever surrounds that function assignment).</p>
<p>When your version (and my updated one) will be finished, we can compare speed and code size (gzipped/packed as well) ok?</p>
<p>I am looking forward for the next challenge (and for comments like your as well)</p>
<p>Best Regards :-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kangax</title>
		<link>http://ajaxian.com/archives/comparison-of-javascript-inheritance-mechanisms-proposal/comment-page-1#comment-271510</link>
		<dc:creator>kangax</dc:creator>
		<pubDate>Fri, 20 Feb 2009 17:27:34 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=6052#comment-271510</guid>
		<description>@WebReflection

I&#039;m sorry but why such vicious coding style? 

Why would you name local variables as global constructors - Function, Object, etc. Then there are self executing functions without parenthesis around them. 

It took me half an hour just to figure out what&#039;s going on in this seemingly simple example. You&#039;re obviously free to write in whichever way you wish, but what I see now makes it really hard to wade through, understand and comment.

I want to mention that Prototype.js, for example, does not overwrite all of the methods of subclass but only those that have `$super` as their first formal parameter. From what I can see, your implementation overwrites all of the methods, as long as same named method is present in a parent &quot;class&quot;. Speaking of methods, `typeof` function, as you probably know, will produce false positives in Safari (when applied to regex) - turning propeties with regex values into functions that try to call those regexes : )

I was also able to make your `extend` implementation work almost twice faster in FF [1], although IE seemed to be a bit slower (and I have no time to figure out why)

[1] http://gist.github.com/67500</description>
		<content:encoded><![CDATA[<p>@WebReflection</p>
<p>I&#8217;m sorry but why such vicious coding style? </p>
<p>Why would you name local variables as global constructors &#8211; Function, Object, etc. Then there are self executing functions without parenthesis around them. </p>
<p>It took me half an hour just to figure out what&#8217;s going on in this seemingly simple example. You&#8217;re obviously free to write in whichever way you wish, but what I see now makes it really hard to wade through, understand and comment.</p>
<p>I want to mention that Prototype.js, for example, does not overwrite all of the methods of subclass but only those that have `$super` as their first formal parameter. From what I can see, your implementation overwrites all of the methods, as long as same named method is present in a parent &#8220;class&#8221;. Speaking of methods, `typeof` function, as you probably know, will produce false positives in Safari (when applied to regex) &#8211; turning propeties with regex values into functions that try to call those regexes : )</p>
<p>I was also able to make your `extend` implementation work almost twice faster in FF [1], although IE seemed to be a bit slower (and I have no time to figure out why)</p>
<p>[1] <a href="http://gist.github.com/67500" rel="nofollow">http://gist.github.com/67500</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WebReflection</title>
		<link>http://ajaxian.com/archives/comparison-of-javascript-inheritance-mechanisms-proposal/comment-page-1#comment-271508</link>
		<dc:creator>WebReflection</dc:creator>
		<pubDate>Fri, 20 Feb 2009 16:33:14 +0000</pubDate>
		<guid isPermaLink="false">http://ajaxian.com/?p=6052#comment-271508</guid>
		<description>First of All, thanks for this entry in Ajaxian. Seconldy, please update the post since there is no jsClass (Ariel Flesler Project) but jClass from John Resig post. Thanks again.</description>
		<content:encoded><![CDATA[<p>First of All, thanks for this entry in Ajaxian. Seconldy, please update the post since there is no jsClass (Ariel Flesler Project) but jClass from John Resig post. Thanks again.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
