<?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: On Classical JavaScript Inheritance</title>
	<atom:link href="http://blogs.nitobi.com/dave/2006/09/07/on-classical-javascript-inheritance/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.nitobi.com/dave/2006/09/07/on-classical-javascript-inheritance/</link>
	<description>let the chips fall where they may</description>
	<lastBuildDate>Fri, 27 Feb 2009 15:19:27 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: ÐžÐžÐŸ Ð¸ JavaScript &#171; ÑˆÐ°Ð¼Ð°Ð½Ñ?ÐºÐ¸Ðµ Ð±Ñ€ÐµÐ´Ð½Ð¸</title>
		<link>http://blogs.nitobi.com/dave/2006/09/07/on-classical-javascript-inheritance/comment-page-1/#comment-46846</link>
		<dc:creator>ÐžÐžÐŸ Ð¸ JavaScript &#171; ÑˆÐ°Ð¼Ð°Ð½Ñ?ÐºÐ¸Ðµ Ð±Ñ€ÐµÐ´Ð½Ð¸</dc:creator>
		<pubDate>Sun, 25 May 2008 07:23:45 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/dave/?p=166#comment-46846</guid>
		<description>[...] &#8230;ÐºÑ€Ð°Ñ‚ÐºÐ¾, Ð¾Ñ‚ Dave Johnson [...]</description>
		<content:encoded><![CDATA[<p>[...] &#8230;ÐºÑ€Ð°Ñ‚ÐºÐ¾, Ð¾Ñ‚ Dave Johnson [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Johnson</title>
		<link>http://blogs.nitobi.com/dave/2006/09/07/on-classical-javascript-inheritance/comment-page-1/#comment-46568</link>
		<dc:creator>Dave Johnson</dc:creator>
		<pubDate>Tue, 20 May 2008 20:22:19 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/dave/?p=166#comment-46568</guid>
		<description>Sorry yes you are correct they are not reserved words but they are both pre-defined object properties that I prefer not to confuse things with.

I do use:
subClass.prototype.constructor = subClass;
in the code. That is just for completeness as the prototype.constructor property by default points to the class constructor and we just want to maintain that since we blow it away with the line:
subClass.prototype = new inheritance();

The other reason I don&#039;t like the JSON syntax is the increased likelihood of the old dangling comma that messes up IE - but to each their own :)</description>
		<content:encoded><![CDATA[<p>Sorry yes you are correct they are not reserved words but they are both pre-defined object properties that I prefer not to confuse things with.</p>
<p>I do use:<br />
subClass.prototype.constructor = subClass;<br />
in the code. That is just for completeness as the prototype.constructor property by default points to the class constructor and we just want to maintain that since we blow it away with the line:<br />
subClass.prototype = new inheritance();</p>
<p>The other reason I don&#8217;t like the JSON syntax is the increased likelihood of the old dangling comma that messes up IE &#8211; but to each their own <img src='http://blogs.nitobi.com/dave/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://blogs.nitobi.com/dave/2006/09/07/on-classical-javascript-inheritance/comment-page-1/#comment-46378</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Fri, 16 May 2008 10:42:28 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/dave/?p=166#comment-46378</guid>
		<description>constructor is not a reserved word, neither is prototype.

http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Reserved_Words 

They are both just properties, but not part of the language, like &quot;while&quot;.

And here you use the constructor property too:
subClass.prototype.constructor = subClass;

Sure, the ClassName.prototype.method thing makes sense, but the JSON syntax makes more sense, and is easier to write.</description>
		<content:encoded><![CDATA[<p>constructor is not a reserved word, neither is prototype.</p>
<p><a href="http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Reserved_Words" rel="nofollow">http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Reserved_Words</a> </p>
<p>They are both just properties, but not part of the language, like &#8220;while&#8221;.</p>
<p>And here you use the constructor property too:<br />
subClass.prototype.constructor = subClass;</p>
<p>Sure, the ClassName.prototype.method thing makes sense, but the JSON syntax makes more sense, and is easier to write.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Johnson</title>
		<link>http://blogs.nitobi.com/dave/2006/09/07/on-classical-javascript-inheritance/comment-page-1/#comment-46360</link>
		<dc:creator>Dave Johnson</dc:creator>
		<pubDate>Thu, 15 May 2008 16:43:06 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/dave/?p=166#comment-46360</guid>
		<description>I don&#039;t use constructor since that is a reserved word in JavaScript.

Yah I don&#039;t really like the ClassName.prototype.method thing either but for a lot of Java type people it makes sense :S</description>
		<content:encoded><![CDATA[<p>I don&#8217;t use constructor since that is a reserved word in JavaScript.</p>
<p>Yah I don&#8217;t really like the ClassName.prototype.method thing either but for a lot of Java type people it makes sense :S</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ChrisS</title>
		<link>http://blogs.nitobi.com/dave/2006/09/07/on-classical-javascript-inheritance/comment-page-1/#comment-46334</link>
		<dc:creator>ChrisS</dc:creator>
		<pubDate>Wed, 14 May 2008 16:06:07 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/dave/?p=166#comment-46334</guid>
		<description>Nice articel.

Can you explain those lines though:

  // enable multiple inheritance
  if (baseClass.base)
  {
    baseClass.prototype.base = baseClass.base;
  }

Else i would rather write:
subClass.base.constructor = baseClass;

instead of 
subClass.baseConstructor = baseClass;

because base is our pseudo keyword already, and constructor is one too...

What is still ugly for me, is that you have to write ClassName.prototype.method for each method you want to add.

A JSON syntax ala
ClassName.prototype =
{
   method: function()
   {
   }
}

would be clearer. This could be easily achieved, if you write the prototype assignment in a for-in loop.</description>
		<content:encoded><![CDATA[<p>Nice articel.</p>
<p>Can you explain those lines though:</p>
<p>  // enable multiple inheritance<br />
  if (baseClass.base)<br />
  {<br />
    baseClass.prototype.base = baseClass.base;<br />
  }</p>
<p>Else i would rather write:<br />
subClass.base.constructor = baseClass;</p>
<p>instead of<br />
subClass.baseConstructor = baseClass;</p>
<p>because base is our pseudo keyword already, and constructor is one too&#8230;</p>
<p>What is still ugly for me, is that you have to write ClassName.prototype.method for each method you want to add.</p>
<p>A JSON syntax ala<br />
ClassName.prototype =<br />
{<br />
   method: function()<br />
   {<br />
   }<br />
}</p>
<p>would be clearer. This could be easily achieved, if you write the prototype assignment in a for-in loop.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: M</title>
		<link>http://blogs.nitobi.com/dave/2006/09/07/on-classical-javascript-inheritance/comment-page-1/#comment-46170</link>
		<dc:creator>M</dc:creator>
		<pubDate>Mon, 12 May 2008 09:27:27 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/dave/?p=166#comment-46170</guid>
		<description>Hi,
I have tried an different techniques related to JavaScript inheritance subject.
The code and the explanation are to long to post them here so if anyone is interested to take a look over it you can find it at &lt;a&gt;www.dotnetcaffe.net&lt;/a&gt; under JavaScript category. Fell free to criticize the code in any way you want...just don&#039;t flame :).</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I have tried an different techniques related to JavaScript inheritance subject.<br />
The code and the explanation are to long to post them here so if anyone is interested to take a look over it you can find it at <a>http://www.dotnetcaffe.net</a> under JavaScript category. Fell free to criticize the code in any way you want&#8230;just don&#8217;t flame <img src='http://blogs.nitobi.com/dave/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: indir</title>
		<link>http://blogs.nitobi.com/dave/2006/09/07/on-classical-javascript-inheritance/comment-page-1/#comment-33106</link>
		<dc:creator>indir</dc:creator>
		<pubDate>Sat, 03 Nov 2007 11:34:28 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/dave/?p=166#comment-33106</guid>
		<description>great article. you have summarized the state of javascript inheritance very nicely. I am using this method now.</description>
		<content:encoded><![CDATA[<p>great article. you have summarized the state of javascript inheritance very nicely. I am using this method now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ÐžÐžÐŸ Ð¸ JavaScript &#171; ÑˆÐ°Ð¼Ð°Ð½ÑÐºÐ¸Ðµ Ð±Ñ€ÐµÐ´Ð½Ð¸</title>
		<link>http://blogs.nitobi.com/dave/2006/09/07/on-classical-javascript-inheritance/comment-page-1/#comment-28278</link>
		<dc:creator>ÐžÐžÐŸ Ð¸ JavaScript &#171; ÑˆÐ°Ð¼Ð°Ð½ÑÐºÐ¸Ðµ Ð±Ñ€ÐµÐ´Ð½Ð¸</dc:creator>
		<pubDate>Sat, 18 Aug 2007 22:32:46 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/dave/?p=166#comment-28278</guid>
		<description>[...] &#8230;ÐºÑ€Ð°Ñ‚ÐºÐ¾, Ð¾Ñ‚ Dave Johnson [...]</description>
		<content:encoded><![CDATA[<p>[...] &#8230;ÐºÑ€Ð°Ñ‚ÐºÐ¾, Ð¾Ñ‚ Dave Johnson [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: william</title>
		<link>http://blogs.nitobi.com/dave/2006/09/07/on-classical-javascript-inheritance/comment-page-1/#comment-8540</link>
		<dc:creator>william</dc:creator>
		<pubDate>Fri, 10 Nov 2006 15:00:35 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/dave/?p=166#comment-8540</guid>
		<description>Hi musbah, 

Could you please tell me more about your inheritance implemenation ??</description>
		<content:encoded><![CDATA[<p>Hi musbah, </p>
<p>Could you please tell me more about your inheritance implemenation ??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Johnson &#187; Blog Archive &#187; links for 2006-09-08</title>
		<link>http://blogs.nitobi.com/dave/2006/09/07/on-classical-javascript-inheritance/comment-page-1/#comment-8492</link>
		<dc:creator>Dave Johnson &#187; Blog Archive &#187; links for 2006-09-08</dc:creator>
		<pubDate>Sun, 22 Oct 2006 18:02:57 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.nitobi.com/dave/?p=166#comment-8492</guid>
		<description>[...] &#171; On Classical JavaScript Inheritance Grid V3.2 &#187;   links for 2006-09-08 [...]</description>
		<content:encoded><![CDATA[<p>[...] &laquo; On Classical JavaScript Inheritance Grid V3.2 &raquo;   links for 2006-09-08 [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

