<?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: Global Domination</title>
	<atom:link href="http://www.yuiblog.com/blog/index.php/2006/06/01/global-domination/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yuiblog.com/blog/2006/06/01/global-domination/</link>
	<description>The official blog of the YUI Project.</description>
	<lastBuildDate>Wed, 17 Mar 2010 00:14:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Scope issues with the callback to JQuery&#8217;s animate() function &#171; sometimes infinity is a loop</title>
		<link>http://www.yuiblog.com/blog/2006/06/01/global-domination/comment-page-1/#comment-581752</link>
		<dc:creator>Scope issues with the callback to JQuery&#8217;s animate() function &#171; sometimes infinity is a loop</dc:creator>
		<pubDate>Mon, 08 Jun 2009 22:24:58 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2006/06/01/global-domination/#comment-581752</guid>
		<description>[...] call functions that are within the global namespace, and I try to avoid anything global for all the well-documented reasons.  I thought about using call() to change the invocation context, but setTimeout.call(object) will [...]</description>
		<content:encoded><![CDATA[<p>[...] call functions that are within the global namespace, and I try to avoid anything global for all the well-documented reasons.  I thought about using call() to change the invocation context, but setTimeout.call(object) will [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dr. Prolix &#187; Blog Archive &#187; Enliven your namespaces</title>
		<link>http://www.yuiblog.com/blog/2006/06/01/global-domination/comment-page-1/#comment-364802</link>
		<dc:creator>Dr. Prolix &#187; Blog Archive &#187; Enliven your namespaces</dc:creator>
		<pubDate>Thu, 01 May 2008 17:10:19 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2006/06/01/global-domination/#comment-364802</guid>
		<description>[...] to use namespaces when writing your JavaScript. The reasons why have been stated time and again by much smarter and more eloquent people than myself, so suffice it to say, you should do [...]</description>
		<content:encoded><![CDATA[<p>[...] to use namespaces when writing your JavaScript. The reasons why have been stated time and again by much smarter and more eloquent people than myself, so suffice it to say, you should do [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vayn技术网摘 &#187; 窥探jQuery</title>
		<link>http://www.yuiblog.com/blog/2006/06/01/global-domination/comment-page-1/#comment-302154</link>
		<dc:creator>Vayn技术网摘 &#187; 窥探jQuery</dc:creator>
		<pubDate>Mon, 11 Feb 2008 00:45:38 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2006/06/01/global-domination/#comment-302154</guid>
		<description>[...] 编写可重用的、优秀的JavaScript代码，其关键在于对名称空间的积极把控。JavaScript只拥有单一的、全局的名称空间（即window对象），而很多程序员（以及一些库）恣意地为之添加各种东西。要知道全局变量是魔鬼！聪明的开发人员，会使用类似组件模式的技术，来尽力减少全局对象的数量。 [...]</description>
		<content:encoded><![CDATA[<p>[...] 编写可重用的、优秀的JavaScript代码，其关键在于对名称空间的积极把控。JavaScript只拥有单一的、全局的名称空间（即window对象），而很多程序员（以及一些库）恣意地为之添加各种东西。要知道全局变量是魔鬼！聪明的开发人员，会使用类似组件模式的技术，来尽力减少全局对象的数量。 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: timothy</title>
		<link>http://www.yuiblog.com/blog/2006/06/01/global-domination/comment-page-1/#comment-294549</link>
		<dc:creator>timothy</dc:creator>
		<pubDate>Thu, 31 Jan 2008 23:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2006/06/01/global-domination/#comment-294549</guid>
		<description>&gt;&gt;OK, but if I document it, then anyone can see it’s intentional:

Comments are not durable. I&#039;ve known programmers who strip all comments upon opening a source file. The justification they give? &quot;Comments are always wrong.&quot; My translation of that is that code can be changed without changing the comments, so the comments don&#039;t necessarily apply to the code that you see.

Making the code clear enough that it doesn&#039;t need comments is the best way to go.</description>
		<content:encoded><![CDATA[<p>&gt;&gt;OK, but if I document it, then anyone can see it’s intentional:</p>
<p>Comments are not durable. I&#8217;ve known programmers who strip all comments upon opening a source file. The justification they give? &#8220;Comments are always wrong.&#8221; My translation of that is that code can be changed without changing the comments, so the comments don&#8217;t necessarily apply to the code that you see.</p>
<p>Making the code clear enough that it doesn&#8217;t need comments is the best way to go.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zachleat.com {web} &#187; Namespacing outside of the YAHOO Namespace</title>
		<link>http://www.yuiblog.com/blog/2006/06/01/global-domination/comment-page-1/#comment-180825</link>
		<dc:creator>zachleat.com {web} &#187; Namespacing outside of the YAHOO Namespace</dc:creator>
		<pubDate>Wed, 29 Aug 2007 01:34:32 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2006/06/01/global-domination/#comment-180825</guid>
		<description>[...] Global Domination, an article written by Douglas Crockford [...]</description>
		<content:encoded><![CDATA[<p>[...] Global Domination, an article written by Douglas Crockford [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julien Lecomte&#8217;s Blog &#187; Introducing the YUI Compressor</title>
		<link>http://www.yuiblog.com/blog/2006/06/01/global-domination/comment-page-1/#comment-172114</link>
		<dc:creator>Julien Lecomte&#8217;s Blog &#187; Introducing the YUI Compressor</dc:creator>
		<pubDate>Tue, 14 Aug 2007 23:39:58 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2006/06/01/global-domination/#comment-172114</guid>
		<description>[...] doesn&#8217;t obfuscate global symbols, and 2) you won&#8217;t pollute the global object (see this great article by Douglas [...]</description>
		<content:encoded><![CDATA[<p>[...] doesn&#8217;t obfuscate global symbols, and 2) you won&#8217;t pollute the global object (see this great article by Douglas [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Foo Hack &#187; YUI&#8217;s &#8220;Module Pattern&#8221; vs. Prototype&#8217;s Class Function</title>
		<link>http://www.yuiblog.com/blog/2006/06/01/global-domination/comment-page-1/#comment-171542</link>
		<dc:creator>Foo Hack &#187; YUI&#8217;s &#8220;Module Pattern&#8221; vs. Prototype&#8217;s Class Function</dc:creator>
		<pubDate>Mon, 13 Aug 2007 17:54:08 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2006/06/01/global-domination/#comment-171542</guid>
		<description>[...] (When in doubt, wrap it in a closure. Global variables are evil.) [...]</description>
		<content:encoded><![CDATA[<p>[...] (When in doubt, wrap it in a closure. Global variables are evil.) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A JavaScript Module Pattern &#187; Yahoo! User Interface Blog</title>
		<link>http://www.yuiblog.com/blog/2006/06/01/global-domination/comment-page-1/#comment-139717</link>
		<dc:creator>A JavaScript Module Pattern &#187; Yahoo! User Interface Blog</dc:creator>
		<pubDate>Tue, 12 Jun 2007 20:28:51 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2006/06/01/global-domination/#comment-139717</guid>
		<description>[...] Global variables are evil. Within YUI, we use only two globals: YAHOO and YAHOO_config. Everthing in YUI makes use of members within the YAHOO object hierarchy or variables that are scoped to such a member. We advise that you exercise similar discipline in your own applications, too. [...]</description>
		<content:encoded><![CDATA[<p>[...] Global variables are evil. Within YUI, we use only two globals: YAHOO and YAHOO_config. Everthing in YUI makes use of members within the YAHOO object hierarchy or variables that are scoped to such a member. We advise that you exercise similar discipline in your own applications, too. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrea Ercolino</title>
		<link>http://www.yuiblog.com/blog/2006/06/01/global-domination/comment-page-1/#comment-45938</link>
		<dc:creator>Andrea Ercolino</dc:creator>
		<pubDate>Sat, 10 Feb 2007 01:41:44 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2006/06/01/global-domination/#comment-45938</guid>
		<description>OK, but if I document it, then anyone can see it&#039;s intentional:
&lt;code&gt;
YAHOO = {}; //implied global
&lt;/code&gt;
---

I think the YAHOO&#039;s declaration can be improved:
&lt;code&gt;
switch( typeof YAHOO ) {
	case &quot;undefined&quot;:
		var YAHOO = {};
		break;
	default:
		YAHOO = {}; //a proper re-definition
}
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>OK, but if I document it, then anyone can see it&#8217;s intentional:<br />
<code><br />
YAHOO = {}; //implied global<br />
</code><br />
&#8212;</p>
<p>I think the YAHOO&#8217;s declaration can be improved:<br />
<code><br />
switch( typeof YAHOO ) {<br />
	case "undefined":<br />
		var YAHOO = {};<br />
		break;<br />
	default:<br />
		YAHOO = {}; //a proper re-definition<br />
}<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Douglas Crockford</title>
		<link>http://www.yuiblog.com/blog/2006/06/01/global-domination/comment-page-1/#comment-45762</link>
		<dc:creator>Douglas Crockford</dc:creator>
		<pubDate>Fri, 09 Feb 2007 17:38:43 +0000</pubDate>
		<guid isPermaLink="false">http://yuiblog.com/blog/2006/06/01/global-domination/#comment-45762</guid>
		<description>I like #1 because it doesn&#039;t look like an accident. I don&#039;t like JavaScript&#039;s implied global policy; I think it was a mistake. So I like all declarations, including global declarations, to be explicit.</description>
		<content:encoded><![CDATA[<p>I like #1 because it doesn&#8217;t look like an accident. I don&#8217;t like JavaScript&#8217;s implied global policy; I think it was a mistake. So I like all declarations, including global declarations, to be explicit.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
