<?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: Self-Printing JavaScript Literals</title>
	<atom:link href="http://osteele.com/archives/2008/02/self-printing-javascript-literals/feed" rel="self" type="application/rss+xml" />
	<link>http://osteele.com/archives/2008/02/self-printing-javascript-literals</link>
	<description>Languages of the real and artificial.</description>
	<lastBuildDate>Thu, 12 Feb 2009 00:20:28 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Plastkort </title>
		<link>http://osteele.com/archives/2008/02/self-printing-javascript-literals/comment-page-1#comment-416</link>
		<dc:creator>Plastkort </dc:creator>
		<pubDate>Wed, 11 Jun 2008 14:17:06 +0000</pubDate>
		<guid isPermaLink="false">http://osteele.com/2008/02/15/self-printing-javascript-literals#comment-416</guid>
		<description>Thanks for the examples.  This is definitely helpful!</description>
		<content:encoded><![CDATA[<p>Thanks for the examples.  This is definitely helpful!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean Edwards</title>
		<link>http://osteele.com/archives/2008/02/self-printing-javascript-literals/comment-page-1#comment-415</link>
		<dc:creator>Dean Edwards</dc:creator>
		<pubDate>Mon, 18 Feb 2008 13:54:24 +0000</pubDate>
		<guid isPermaLink="false">http://osteele.com/2008/02/15/self-printing-javascript-literals#comment-415</guid>
		<description>BTW, If you use this in Functional.js then you will have to change this line:

if (specialized[i] == _)

to this:

if (specialized[i] === _)</description>
		<content:encoded><![CDATA[<p><span class="caps">BTW,</span> If you use this in Functional.js then you will have to change this line:</p>
<p>if (specialized[i] == _)</p>
<p>to this:</p>
<p>if (specialized[i] === _)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dean Edwards</title>
		<link>http://osteele.com/archives/2008/02/self-printing-javascript-literals/comment-page-1#comment-414</link>
		<dc:creator>Dean Edwards</dc:creator>
		<pubDate>Mon, 18 Feb 2008 13:25:48 +0000</pubDate>
		<guid isPermaLink="false">http://osteele.com/2008/02/15/self-printing-javascript-literals#comment-414</guid>
		<description>var _ = {toString: K(&quot;_&quot;)};</description>
		<content:encoded><![CDATA[<p>var _ = {toString: K(&#8221;_&#8221;)};</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will Moffat</title>
		<link>http://osteele.com/archives/2008/02/self-printing-javascript-literals/comment-page-1#comment-413</link>
		<dc:creator>Will Moffat</dc:creator>
		<pubDate>Mon, 18 Feb 2008 12:28:08 +0000</pubDate>
		<guid isPermaLink="false">http://osteele.com/2008/02/15/self-printing-javascript-literals#comment-413</guid>
		<description>Hi, that&#039;s a great writeup of a neat technqiue. Thanks.

Some minor typos: L1  L1 and L2 L2 are missing their == comparison operator. the &#039;pre&#039; tag has snuck into your post.</description>
		<content:encoded><![CDATA[<p>Hi, that&#8217;s a great writeup of a neat technqiue. Thanks.</p>
<p>Some minor typos: L1  L1 and L2 L2 are missing their == comparison operator. the &#8216;pre&#8217; tag has snuck into your post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kangax</title>
		<link>http://osteele.com/archives/2008/02/self-printing-javascript-literals/comment-page-1#comment-412</link>
		<dc:creator>kangax</dc:creator>
		<pubDate>Sun, 17 Feb 2008 00:28:00 +0000</pubDate>
		<guid isPermaLink="false">http://osteele.com/2008/02/15/self-printing-javascript-literals#comment-412</guid>
		<description>Interesting.
We could of course go even further and support n-level nesting (which is not exactly the point of the article, but is still entertaining)

[code]
function defineLiteral() {
  var o = window, args = arguments, prop;
  for (var i=0, l = arguments.length; i&lt;l; ++i) {
    prop = arguments[i];
    o[prop] = o[prop] &#124;&#124; { }; o = o[prop];
    if (i == l-1) o[&#039;toString&#039;] = function() {
      return Array.prototype.join.call(args, &#039;.&#039;)
    }
  }
  return o;
}

defineLiteral(&#039;bar&#039;, &#039;baz&#039;, &#039;qux&#039;, &#039;quux&#039;); // =&gt; bar.baz.qux.quux
bar.baz.qux.quux.toString(); // =&gt; &#039;bar.baz.qux.quux&#039;
[/code]

</description>
		<content:encoded><![CDATA[<p>Interesting.<br />
We could of course go even further and support n-level nesting (which is not exactly the point of the article, but is still entertaining)</p>
<p>[code]<br />
function defineLiteral() {<br />
  var o = window, args = arguments, prop;<br />
  for (var i=0, l = arguments.length; i&lt;l; ++i) {<br />
    prop = arguments[i];<br />
    o[prop] = o[prop] || { }; o = o[prop];<br />
    if (i == l-1) o['toString'] = function() {<br />
      return Array.prototype.join.call(args, '.')<br />
    }<br />
  }<br />
  return o;<br />
}</p>
<p>defineLiteral('bar', 'baz', 'qux', 'quux'); // =&gt; bar.baz.qux.quux<br />
bar.baz.qux.quux.toString(); // =&gt; 'bar.baz.qux.quux'<br />
[/code]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
