<?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: JavaScript: Variable declarations and scope</title>
	<atom:link href="http://uxebu.com/2010/01/09/variable-declarations-and-scope/feed/" rel="self" type="application/rss+xml" />
	<link>http://uxebu.com/blog/2010/01/09/variable-declarations-and-scope/</link>
	<description></description>
	<lastBuildDate>Thu, 02 Feb 2012 20:13:01 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: cin takvimi</title>
		<link>http://uxebu.com/blog/2010/01/09/variable-declarations-and-scope/#comment-218</link>
		<dc:creator>cin takvimi</dc:creator>
		<pubDate>Tue, 05 Apr 2011 18:54:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uxebu.com/?p=864#comment-218</guid>
		<description>Keep up the  fantastic  work , I read few  content  on this  internet site  and I  conceive that your  web blog  is very   interesting and  holds   circles  of  fantastic   information.</description>
		<content:encoded><![CDATA[<p>Keep up the  fantastic  work , I read few  content  on this  internet site  and I  conceive that your  web blog  is very   interesting and  holds   circles  of  fantastic   information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Biuro Rachunkowe wrocław</title>
		<link>http://uxebu.com/blog/2010/01/09/variable-declarations-and-scope/#comment-217</link>
		<dc:creator>Biuro Rachunkowe wrocław</dc:creator>
		<pubDate>Thu, 23 Dec 2010 04:37:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uxebu.com/?p=864#comment-217</guid>
		<description>I just found this blog a while back when a friend suggested it to me. I have been a regular reader ever since.</description>
		<content:encoded><![CDATA[<p>I just found this blog a while back when a friend suggested it to me. I have been a regular reader ever since.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Heinz von Heiden</title>
		<link>http://uxebu.com/blog/2010/01/09/variable-declarations-and-scope/#comment-216</link>
		<dc:creator>Heinz von Heiden</dc:creator>
		<pubDate>Tue, 14 Dec 2010 11:05:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uxebu.com/?p=864#comment-216</guid>
		<description>Conspicuous site, pls contiune your work and keep us update with more storys</description>
		<content:encoded><![CDATA[<p>Conspicuous site, pls contiune your work and keep us update with more storys</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack Tanner</title>
		<link>http://uxebu.com/blog/2010/01/09/variable-declarations-and-scope/#comment-215</link>
		<dc:creator>Jack Tanner</dc:creator>
		<pubDate>Wed, 14 Jul 2010 20:44:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uxebu.com/?p=864#comment-215</guid>
		<description>This is called &#039;hoisting&#039; the declaration.

For example, see http://www.adequatelygood.com/2010/2/JavaScript-Scoping-and-Hoisting</description>
		<content:encoded><![CDATA[<p>This is called &#8216;hoisting&#8217; the declaration.</p>
<p>For example, see <a href="http://www.adequatelygood.com/2010/2/JavaScript-Scoping-and-Hoisting" rel="nofollow">http://www.adequatelygood.com/2010/2/JavaScript-Scoping-and-Hoisting</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tjerk Wolterink</title>
		<link>http://uxebu.com/blog/2010/01/09/variable-declarations-and-scope/#comment-214</link>
		<dc:creator>Tjerk Wolterink</dc:creator>
		<pubDate>Sat, 09 Jan 2010 14:37:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.uxebu.com/?p=864#comment-214</guid>
		<description>Ah nice, i knew about function scope but i did not new about the javascript interpreter checking all declaration before execution.  Again it&#039;s all about semantics, that&#039;s why a specification is so important. Too bad the ecmascript specifications are written in plain text. This increases the chances of different interpretations and ambiguity.

For example what do you think the value of x is after running this code?

var b=10;
var f=function() {
 var b=5;
 function g() {
  var b=8;
  return this.b;
 }
 return g();
};
var x = f();

Before running it try to run it in your head and write down the value of x. Then run it in a javscript engine ;-)

Semantics specifications *should* be written in a formal language like Structural Operational Semantics... but then only a few people can actually read them ;-)

Check SOS description of JS here! (the example was also from there)
http://www.stanford.edu/class/cs242/slides/OperSemanticsJS

But again thanks for this insight, i think it&#039;s one of the bad things of javascript ;-)
Greetings to Nikolai!</description>
		<content:encoded><![CDATA[<p>Ah nice, i knew about function scope but i did not new about the javascript interpreter checking all declaration before execution.  Again it&#8217;s all about semantics, that&#8217;s why a specification is so important. Too bad the ecmascript specifications are written in plain text. This increases the chances of different interpretations and ambiguity.</p>
<p>For example what do you think the value of x is after running this code?</p>
<p>var b=10;<br />
var f=function() {<br />
 var b=5;<br />
 function g() {<br />
  var b=8;<br />
  return this.b;<br />
 }<br />
 return g();<br />
};<br />
var x = f();</p>
<p>Before running it try to run it in your head and write down the value of x. Then run it in a javscript engine ;-)</p>
<p>Semantics specifications *should* be written in a formal language like Structural Operational Semantics&#8230; but then only a few people can actually read them ;-)</p>
<p>Check SOS description of JS here! (the example was also from there)<br />
<a href="http://www.stanford.edu/class/cs242/slides/OperSemanticsJS" rel="nofollow">http://www.stanford.edu/class/cs242/slides/OperSemanticsJS</a></p>
<p>But again thanks for this insight, i think it&#8217;s one of the bad things of javascript ;-)<br />
Greetings to Nikolai!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

