<?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"
	>
<channel>
	<title>Comments for JSPatterns.com</title>
	<atom:link href="http://www.jspatterns.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jspatterns.com</link>
	<description>Exploring common JavaScript patterns and anti-patterns</description>
	<pubDate>Fri, 10 Sep 2010 05:07:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5-RC1</generator>
		<item>
		<title>Comment on Book is almost out by stoyan</title>
		<link>http://www.jspatterns.com/book-is-almost-out/#comment-4345</link>
		<dc:creator>stoyan</dc:creator>
		<pubDate>Wed, 08 Sep 2010 21:20:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.jspatterns.com/?p=74#comment-4345</guid>
		<description>Kindle edition should be available even sooner, meaning any day now</description>
		<content:encoded><![CDATA[<p>Kindle edition should be available even sooner, meaning any day now</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Book is almost out by Tuzemec</title>
		<link>http://www.jspatterns.com/book-is-almost-out/#comment-4330</link>
		<dc:creator>Tuzemec</dc:creator>
		<pubDate>Wed, 08 Sep 2010 13:47:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.jspatterns.com/?p=74#comment-4330</guid>
		<description>What about kindle edition? :-)</description>
		<content:encoded><![CDATA[<p>What about kindle edition? <img src='http://www.jspatterns.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Book is almost out by Dimitar #Christoff</title>
		<link>http://www.jspatterns.com/book-is-almost-out/#comment-4235</link>
		<dc:creator>Dimitar #Christoff</dc:creator>
		<pubDate>Sat, 04 Sep 2010 20:52:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.jspatterns.com/?p=74#comment-4235</guid>
		<description>I guess congratulations are in order, well done - tweet up when it's out on amazon uk :) 

I will just add I've been following your work since smush.it and it gives me great pleasure seeing such a prolific and successful compatriot mixing it up with the the likes of Doug Crockford, Steve Souders and the incredible Yahoo team, putting back so much into the javascript and webdev communities. All I can say is, keep up the amazing work.</description>
		<content:encoded><![CDATA[<p>I guess congratulations are in order, well done - tweet up when it&#8217;s out on amazon uk <img src='http://www.jspatterns.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I will just add I&#8217;ve been following your work since smush.it and it gives me great pleasure seeing such a prolific and successful compatriot mixing it up with the the likes of Doug Crockford, Steve Souders and the incredible Yahoo team, putting back so much into the javascript and webdev communities. All I can say is, keep up the amazing work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Book is almost out by Asen Bozhilov</title>
		<link>http://www.jspatterns.com/book-is-almost-out/#comment-4233</link>
		<dc:creator>Asen Bozhilov</dc:creator>
		<pubDate>Sat, 04 Sep 2010 20:33:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.jspatterns.com/?p=74#comment-4233</guid>
		<description>Congrats for your efforts. The book is exciting and every javascript developer must be read it. It cover important parts from the language by many examples and understandable sentences, which is very important for technical books. The book is great addition to ECMA-262 specification. 

Good luck!</description>
		<content:encoded><![CDATA[<p>Congrats for your efforts. The book is exciting and every javascript developer must be read it. It cover important parts from the language by many examples and understandable sentences, which is very important for technical books. The book is great addition to ECMA-262 specification. </p>
<p>Good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Self-executing functions by Karl</title>
		<link>http://www.jspatterns.com/self-executing-functions/#comment-3615</link>
		<dc:creator>Karl</dc:creator>
		<pubDate>Thu, 05 Aug 2010 12:43:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.jspatterns.com/?p=62#comment-3615</guid>
		<description>@Avi - I think the author is trying to get across that the variables and functions inside a self-executing anon function will not be global and therefore won't clobber any variables / functions that may already exist in the global namespace, i.e. if you declare a var / function without namespacing it or using a particular function pattern it will be part of the global namespace, i.e. the window object in a browser, hope this helps....</description>
		<content:encoded><![CDATA[<p>@Avi - I think the author is trying to get across that the variables and functions inside a self-executing anon function will not be global and therefore won&#8217;t clobber any variables / functions that may already exist in the global namespace, i.e. if you declare a var / function without namespacing it or using a particular function pattern it will be part of the global namespace, i.e. the window object in a browser, hope this helps&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Self-executing functions by Avi</title>
		<link>http://www.jspatterns.com/self-executing-functions/#comment-3571</link>
		<dc:creator>Avi</dc:creator>
		<pubDate>Tue, 03 Aug 2010 15:25:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.jspatterns.com/?p=62#comment-3571</guid>
		<description>I didn't understand the part of:
"...You don’t want to add your variables and functions to the host page’s naming space and possibly causing a naming conflict with the page's core code."
How can this scenario happen?
Can you give me an example?</description>
		<content:encoded><![CDATA[<p>I didn&#8217;t understand the part of:<br />
&#8220;&#8230;You don’t want to add your variables and functions to the host page’s naming space and possibly causing a naming conflict with the page&#8217;s core code.&#8221;<br />
How can this scenario happen?<br />
Can you give me an example?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Singleton without a closure by jdalton</title>
		<link>http://www.jspatterns.com/singleton-without-a-closure/#comment-3351</link>
		<dc:creator>jdalton</dc:creator>
		<pubDate>Sun, 18 Jul 2010 19:06:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.jspatterns.com/?p=70#comment-3351</guid>
		<description>For a flavor more in line with the pattern you are trying to achieve:

&lt;code&gt;
var Single = function(name) {
  function Klass() { };
  function Single(name) {
    name &#38;&#38; (one.name = name);
    return one;
  }
  Single.prototype = Klass.prototype = window.Single.prototype;
  window.Single = Single;
  var one = new Klass;
  return Single(name);
};

Single.prototype.name = 'Foo';

Single.prototype.getName = function () {
  return this.name;
};
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>For a flavor more in line with the pattern you are trying to achieve:</p>
<p><code><br />
var Single = function(name) {<br />
  function Klass() { };<br />
  function Single(name) {<br />
    name &amp;&amp; (one.name = name);<br />
    return one;<br />
  }<br />
  Single.prototype = Klass.prototype = window.Single.prototype;<br />
  window.Single = Single;<br />
  var one = new Klass;<br />
  return Single(name);<br />
};</p>
<p>Single.prototype.name = 'Foo';</p>
<p>Single.prototype.getName = function () {<br />
  return this.name;<br />
};<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Singleton without a closure by jdalton</title>
		<link>http://www.jspatterns.com/singleton-without-a-closure/#comment-3350</link>
		<dc:creator>jdalton</dc:creator>
		<pubDate>Sun, 18 Jul 2010 18:50:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.jspatterns.com/?p=70#comment-3350</guid>
		<description>At least IE, Safari, and Opera all fail this pattern because they evaluate the literal each time. Balázs' suggestion is better.

&lt;code&gt;
var Single = (function() {
  function Klass() { };
  function Single(name) {
    one.name = name &#124;&#124; 'Foo';
    return one;
  }
  var one = new Klass;
  Single.prototype = Klass.prototype;
  return Single;
})();

Single.prototype.getName = function () {
  return this.name;
};
&lt;/code&gt;

The it works cross-browser, the instance isn't stored as an external property, and it allows `Single` to work when called as function or a constructor.</description>
		<content:encoded><![CDATA[<p>At least IE, Safari, and Opera all fail this pattern because they evaluate the literal each time. Balázs&#8217; suggestion is better.</p>
<p><code><br />
var Single = (function() {<br />
  function Klass() { };<br />
  function Single(name) {<br />
    one.name = name || 'Foo';<br />
    return one;<br />
  }<br />
  var one = new Klass;<br />
  Single.prototype = Klass.prototype;<br />
  return Single;<br />
})();</p>
<p>Single.prototype.getName = function () {<br />
  return this.name;<br />
};<br />
</code></p>
<p>The it works cross-browser, the instance isn&#8217;t stored as an external property, and it allows `Single` to work when called as function or a constructor.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Singleton without a closure by Balázs Galambosi</title>
		<link>http://www.jspatterns.com/singleton-without-a-closure/#comment-3346</link>
		<dc:creator>Balázs Galambosi</dc:creator>
		<pubDate>Sun, 18 Jul 2010 09:54:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.jspatterns.com/?p=70#comment-3346</guid>
		<description>Lol. Why not: 

&lt;code&gt;
function Single() {
    "strict me not!";

    if (Single.instance) {
        return Single.instance;
    }
    Single.instance = this;
    this.name = "Foo";
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Lol. Why not: </p>
<p><code><br />
function Single() {<br />
    "strict me not!";</p>
<p>    if (Single.instance) {<br />
        return Single.instance;<br />
    }<br />
    Single.instance = this;<br />
    this.name = "Foo";<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Self-executing functions by Alva Giannecchini</title>
		<link>http://www.jspatterns.com/self-executing-functions/#comment-3210</link>
		<dc:creator>Alva Giannecchini</dc:creator>
		<pubDate>Sun, 04 Jul 2010 19:16:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.jspatterns.com/?p=62#comment-3210</guid>
		<description>awesome bless you for composing this</description>
		<content:encoded><![CDATA[<p>awesome bless you for composing this</p>
]]></content:encoded>
	</item>
</channel>
</rss>
