<?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/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: 作用域链 词法作用域 与 闭包（一）</title>
	<atom:link href="http://www.mikkolee.com/81/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mikkolee.com/81</link>
	<description>关于界面的价值观与方法论</description>
	<lastBuildDate>Sat, 04 Sep 2010 14:28:41 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Javascript 的词法作用域、调用对象和闭包 - 鳯鸣志</title>
		<link>http://www.mikkolee.com/81/comment-page-1#comment-477</link>
		<dc:creator>Javascript 的词法作用域、调用对象和闭包 - 鳯鸣志</dc:creator>
		<pubDate>Fri, 08 Jan 2010 17:08:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=81#comment-477</guid>
		<description>[...] 作用域链 词法作用域 与 闭包（一） [...]</description>
		<content:encoded><![CDATA[<p>[...] 作用域链 词法作用域 与 闭包（一） [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pbqi</title>
		<link>http://www.mikkolee.com/81/comment-page-1#comment-453</link>
		<dc:creator>pbqi</dc:creator>
		<pubDate>Tue, 15 Dec 2009 05:19:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=81#comment-453</guid>
		<description>非常感谢</description>
		<content:encoded><![CDATA[<p>非常感谢</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vapour</title>
		<link>http://www.mikkolee.com/81/comment-page-1#comment-391</link>
		<dc:creator>vapour</dc:creator>
		<pubDate>Fri, 09 Oct 2009 00:02:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=81#comment-391</guid>
		<description>对lexical scope懂了点</description>
		<content:encoded><![CDATA[<p>对lexical scope懂了点</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fornever</title>
		<link>http://www.mikkolee.com/81/comment-page-1#comment-157</link>
		<dc:creator>fornever</dc:creator>
		<pubDate>Tue, 20 Jan 2009 01:50:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=81#comment-157</guid>
		<description>谢谢小麦的这篇文章，终于对调用对象有了更清晰的认识，有些事情也更明朗了。</description>
		<content:encoded><![CDATA[<p>谢谢小麦的这篇文章，终于对调用对象有了更清晰的认识，有些事情也更明朗了。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 2008年终总结 &#124; Belltoy's blog</title>
		<link>http://www.mikkolee.com/81/comment-page-1#comment-129</link>
		<dc:creator>2008年终总结 &#124; Belltoy's blog</dc:creator>
		<pubDate>Sat, 27 Dec 2008 17:18:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=81#comment-129</guid>
		<description>[...]  注1：参见 小麦的文章《作用域链 词法作用域 与 闭包（一）》以及我的评论。 [...]</description>
		<content:encoded><![CDATA[<p>[...]  注1：参见 小麦的文章《作用域链 词法作用域 与 闭包（一）》以及我的评论。 [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 小麦</title>
		<link>http://www.mikkolee.com/81/comment-page-1#comment-126</link>
		<dc:creator>小麦</dc:creator>
		<pubDate>Sat, 27 Dec 2008 15:40:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=81#comment-126</guid>
		<description>嗯，没错，你讲的是正确的。

所以所谓的“定义的时候”，其实也就是指将此函数实例化的时候。</description>
		<content:encoded><![CDATA[<p>嗯，没错，你讲的是正确的。</p>
<p>所以所谓的“定义的时候”，其实也就是指将此函数实例化的时候。</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: belltoy</title>
		<link>http://www.mikkolee.com/81/comment-page-1#comment-125</link>
		<dc:creator>belltoy</dc:creator>
		<pubDate>Sat, 27 Dec 2008 11:48:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=81#comment-125</guid>
		<description>小麦上面有个地方说得不对。犀牛书中并不是说“由它的定义语句决”，它说的是在函数定义的时候决定的，而不是在执行的时候决定的。这里“定义语句”和“定义的时候”是不同的概念。
犀牛书乱第五版里的原文是：
Functions in JavaScript are lexically rather than dynamically scoped. This means that they run in the scope in which they are defined, not the scope from which they are executed.</description>
		<content:encoded><![CDATA[<p>小麦上面有个地方说得不对。犀牛书中并不是说“由它的定义语句决”，它说的是在函数定义的时候决定的，而不是在执行的时候决定的。这里“定义语句”和“定义的时候”是不同的概念。<br />
犀牛书乱第五版里的原文是：<br />
Functions in JavaScript are lexically rather than dynamically scoped. This means that they run in the scope in which they are defined, not the scope from which they are executed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jay</title>
		<link>http://www.mikkolee.com/81/comment-page-1#comment-104</link>
		<dc:creator>jay</dc:creator>
		<pubDate>Wed, 10 Dec 2008 10:43:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=81#comment-104</guid>
		<description>很复杂的东西，往往是很简单的，看下chrome的源码实现不就明白了</description>
		<content:encoded><![CDATA[<p>很复杂的东西，往往是很简单的，看下chrome的源码实现不就明白了</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 小麦</title>
		<link>http://www.mikkolee.com/81/comment-page-1#comment-87</link>
		<dc:creator>小麦</dc:creator>
		<pubDate>Sat, 22 Nov 2008 04:05:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=81#comment-87</guid>
		<description>嗯，我觉得你的解释挺清楚的。

我觉得问题的关键是，就你的说法，词法作用域的定义是要在编译时确定作用域，也就是说，在声明一个函数的时候，就已经为它建立运行环境空间。

而JS是在调用时才建立运行环境，因此以上面的定义，它只能算是一种由动态作用域链的机制“模拟”出的词法作用域。

但我之前的理解是，词法作用域这个概念，只是规定作用域是跟函数声明有关即可。

因此JS是否属于词法作用域，只在于动态绑定作用域链时，该选择定义环境的作用域链，还是调用环境的作用域链。这只是个链头选择的问题，而跟作用域链机制本身无关。

不知道你明白我的逻辑没？</description>
		<content:encoded><![CDATA[<p>嗯，我觉得你的解释挺清楚的。</p>
<p>我觉得问题的关键是，就你的说法，词法作用域的定义是要在编译时确定作用域，也就是说，在声明一个函数的时候，就已经为它建立运行环境空间。</p>
<p>而JS是在调用时才建立运行环境，因此以上面的定义，它只能算是一种由动态作用域链的机制“模拟”出的词法作用域。</p>
<p>但我之前的理解是，词法作用域这个概念，只是规定作用域是跟函数声明有关即可。</p>
<p>因此JS是否属于词法作用域，只在于动态绑定作用域链时，该选择定义环境的作用域链，还是调用环境的作用域链。这只是个链头选择的问题，而跟作用域链机制本身无关。</p>
<p>不知道你明白我的逻辑没？</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hax</title>
		<link>http://www.mikkolee.com/81/comment-page-1#comment-84</link>
		<dc:creator>hax</dc:creator>
		<pubDate>Fri, 21 Nov 2008 10:24:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.mikkolee.com/?p=81#comment-84</guid>
		<description>关于with/eval对于lexical scope的影响，可以看这位用scheme实现JS引擎的同志的说法（http://calculist.blogspot.com/2008/10/updated-javascriptplt.html）： 

...But the real subtlety comes in with the with (dynamically add a computed object value to the runtime environment as a new environment frame) and eval constructs... 
... So outside of a with, you get normal, efficient lexical scope; inside a with, you get stupid, slow, dynamic scope...</description>
		<content:encoded><![CDATA[<p>关于with/eval对于lexical scope的影响，可以看这位用scheme实现JS引擎的同志的说法（http://calculist.blogspot.com/2008/10/updated-javascriptplt.html）： </p>
<p>&#8230;But the real subtlety comes in with the with (dynamically add a computed object value to the runtime environment as a new environment frame) and eval constructs&#8230;<br />
&#8230; So outside of a with, you get normal, efficient lexical scope; inside a with, you get stupid, slow, dynamic scope&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
