<?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: Dealing with JavaScript scope issues; The tale of Alex kindly indulging me</title>
	<atom:link href="http://almaer.com/blog/dealing-with-javascript-scope-issues-the-tale-of-alex-kindly-indulging-me/feed" rel="self" type="application/rss+xml" />
	<link>http://almaer.com/blog/dealing-with-javascript-scope-issues-the-tale-of-alex-kindly-indulging-me</link>
	<description>blogging about life, the universe, and everything tech</description>
	<lastBuildDate>Sat, 08 Sep 2012 07:06:53 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: haberler</title>
		<link>http://almaer.com/blog/dealing-with-javascript-scope-issues-the-tale-of-alex-kindly-indulging-me/comment-page-1#comment-41565</link>
		<dc:creator>haberler</dc:creator>
		<pubDate>Wed, 05 Aug 2009 09:22:03 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2335#comment-41565</guid>
		<description>useful article thank you. And i loved you secret question :)</description>
		<content:encoded><![CDATA[<p>useful article thank you. And i loved you secret question :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: toshiba</title>
		<link>http://almaer.com/blog/dealing-with-javascript-scope-issues-the-tale-of-alex-kindly-indulging-me/comment-page-1#comment-40797</link>
		<dc:creator>toshiba</dc:creator>
		<pubDate>Thu, 30 Apr 2009 01:46:02 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2335#comment-40797</guid>
		<description>JavaScript is about run-time. Run-time is great and all, but especially when dealing with the browser, and how your Web page has to bootstrap the entire world on every load, Ajax developers have to think about issues that other people don’t.</description>
		<content:encoded><![CDATA[<p>JavaScript is about run-time. Run-time is great and all, but especially when dealing with the browser, and how your Web page has to bootstrap the entire world on every load, Ajax developers have to think about issues that other people don’t.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex Russell</title>
		<link>http://almaer.com/blog/dealing-with-javascript-scope-issues-the-tale-of-alex-kindly-indulging-me/comment-page-1#comment-40634</link>
		<dc:creator>Alex Russell</dc:creator>
		<pubDate>Tue, 31 Mar 2009 17:05:32 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2335#comment-40634</guid>
		<description>something I failed to mention in my original mail:

I have some hope that we&#039;d be able to actually introspect (vai a Rhino AST or something) on the APIs that you&#039;d be using from such a mapping and roll them back at build time. 

As to Erik&#039;s with(){} comment, it&#039;s not really possible to turn off JIT in v8, but with(){} will cause polymorphic inline caching to become much less effective, hurting most kinds of lookups. It&#039;ll still be happening in machine code (vs, say, IE which will need to look it up in the interpreter), but it will still be JIT&#039;d.

Regards</description>
		<content:encoded><![CDATA[<p>something I failed to mention in my original mail:</p>
<p>I have some hope that we&#8217;d be able to actually introspect (vai a Rhino AST or something) on the APIs that you&#8217;d be using from such a mapping and roll them back at build time. </p>
<p>As to Erik&#8217;s with(){} comment, it&#8217;s not really possible to turn off JIT in v8, but with(){} will cause polymorphic inline caching to become much less effective, hurting most kinds of lookups. It&#8217;ll still be happening in machine code (vs, say, IE which will need to look it up in the interpreter), but it will still be JIT&#8217;d.</p>
<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dion Almaer</title>
		<link>http://almaer.com/blog/dealing-with-javascript-scope-issues-the-tale-of-alex-kindly-indulging-me/comment-page-1#comment-40632</link>
		<dc:creator>Dion Almaer</dc:creator>
		<pubDate>Mon, 30 Mar 2009 20:06:09 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2335#comment-40632</guid>
		<description>Yes, yes, this isn&#039;t meant to be a &quot;do this in production&quot; type thing, but rather an &quot;experiment to see how JavaScript can be contorted in a way to make it both nice to work with, and sandboxed&quot;</description>
		<content:encoded><![CDATA[<p>Yes, yes, this isn&#8217;t meant to be a &#8220;do this in production&#8221; type thing, but rather an &#8220;experiment to see how JavaScript can be contorted in a way to make it both nice to work with, and sandboxed&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eugene Lazutkin</title>
		<link>http://almaer.com/blog/dealing-with-javascript-scope-issues-the-tale-of-alex-kindly-indulging-me/comment-page-1#comment-40631</link>
		<dc:creator>Eugene Lazutkin</dc:creator>
		<pubDate>Mon, 30 Mar 2009 19:02:18 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2335#comment-40631</guid>
		<description>While JavaScript is not strictly a homoiconic language, it is fun to see what is possible. The biggest problem of this approach not with &quot;with&quot; but &quot;func.toString()&quot; --- it doesn&#039;t work on some mobile browsers as expected (does not return a function&#039;s text sufficient to reconstruct the function).

If only the committee found a way to standardize AST making JavaScript homoiconic (http://en.wikipedia.org/wiki/Homoiconic), we would have an elegant way to do this stuff and a lot more including custom pre-processing, DSLs, code and data specializations, and so on.</description>
		<content:encoded><![CDATA[<p>While JavaScript is not strictly a homoiconic language, it is fun to see what is possible. The biggest problem of this approach not with &#8220;with&#8221; but &#8220;func.toString()&#8221; &#8212; it doesn&#8217;t work on some mobile browsers as expected (does not return a function&#8217;s text sufficient to reconstruct the function).</p>
<p>If only the committee found a way to standardize AST making JavaScript homoiconic (<a href="http://en.wikipedia.org/wiki/Homoiconic)" rel="nofollow">http://en.wikipedia.org/wiki/Homoiconic)</a>, we would have an elegant way to do this stuff and a lot more including custom pre-processing, DSLs, code and data specializations, and so on.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: henrah</title>
		<link>http://almaer.com/blog/dealing-with-javascript-scope-issues-the-tale-of-alex-kindly-indulging-me/comment-page-1#comment-40630</link>
		<dc:creator>henrah</dc:creator>
		<pubDate>Mon, 30 Mar 2009 17:38:24 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2335#comment-40630</guid>
		<description>If you&#039;re going to use the `with` operator anyway, why bother using this runWith method? You&#039;re incurring the considerable cost of decompiling and recompiling a function, plus the method setup and teardown process, on top of the existing penalty imposed by using `with` in the first place -- and the API is not ultimately any simpler than a set of nested `with(object){}` blocks.

The API may look cleaner and more idiomatic because it looks like you&#039;re passing a closure/callback function in the style of modern libraries, but really you&#039;re not passing a closure at all. You&#039;re just passing the textual representation of a block, since all its context is lost when it gets converted into text and recompiled by the Function() constructor. What benefit does this confer? It seems to me like a very flimsy decoration over a widely despised language feature.</description>
		<content:encoded><![CDATA[<p>If you&#8217;re going to use the `with` operator anyway, why bother using this runWith method? You&#8217;re incurring the considerable cost of decompiling and recompiling a function, plus the method setup and teardown process, on top of the existing penalty imposed by using `with` in the first place &#8212; and the API is not ultimately any simpler than a set of nested `with(object){}` blocks.</p>
<p>The API may look cleaner and more idiomatic because it looks like you&#8217;re passing a closure/callback function in the style of modern libraries, but really you&#8217;re not passing a closure at all. You&#8217;re just passing the textual representation of a block, since all its context is lost when it gets converted into text and recompiled by the Function() constructor. What benefit does this confer? It seems to me like a very flimsy decoration over a widely despised language feature.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ray Cromwell</title>
		<link>http://almaer.com/blog/dealing-with-javascript-scope-issues-the-tale-of-alex-kindly-indulging-me/comment-page-1#comment-40628</link>
		<dc:creator>Ray Cromwell</dc:creator>
		<pubDate>Mon, 30 Mar 2009 17:16:25 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2335#comment-40628</guid>
		<description>I dunno, given the extra verbiage of dojo.runWith, the object array, and the function() {} closure, you&#039;d have to type the dojo &#039;prefix&#039; more than 6 times before you&#039;d gain any less verbiage, and you pay a high cost.</description>
		<content:encoded><![CDATA[<p>I dunno, given the extra verbiage of dojo.runWith, the object array, and the function() {} closure, you&#8217;d have to type the dojo &#8216;prefix&#8217; more than 6 times before you&#8217;d gain any less verbiage, and you pay a high cost.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Erik Arvidsson</title>
		<link>http://almaer.com/blog/dealing-with-javascript-scope-issues-the-tale-of-alex-kindly-indulging-me/comment-page-1#comment-40627</link>
		<dc:creator>Erik Arvidsson</dc:creator>
		<pubDate>Mon, 30 Mar 2009 16:33:47 +0000</pubDate>
		<guid isPermaLink="false">http://almaer.com/blog/?p=2335#comment-40627</guid>
		<description>Don&#039;t do this on any production code. You have been warned :-)

I&#039;m pretty sure that the with statement will turn off jitting for all major engines. The reason why all browser vendors wants to remove with is not only that it is error prone and confuses the hell out of most people. It also prevents optimizations.

The only solution to this problem that I&#039;ve seen involves a compiler/preprocessor. While developing you can use eval (like base2) and then before you deploy you run a preprocessor that replaces those evals with inline code.</description>
		<content:encoded><![CDATA[<p>Don&#8217;t do this on any production code. You have been warned :-)</p>
<p>I&#8217;m pretty sure that the with statement will turn off jitting for all major engines. The reason why all browser vendors wants to remove with is not only that it is error prone and confuses the hell out of most people. It also prevents optimizations.</p>
<p>The only solution to this problem that I&#8217;ve seen involves a compiler/preprocessor. While developing you can use eval (like base2) and then before you deploy you run a preprocessor that replaces those evals with inline code.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
