<?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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
	>
<channel>
	<title>Comments on: Recursively Symbolize Keys</title>
	<atom:link href="http://avdi.org/devblog/2009/07/14/recursively-symbolize-keys/feed/" rel="self" type="application/rss+xml" />
	<link>http://avdi.org/devblog/2009/07/14/recursively-symbolize-keys/</link>
	<description>"...the three great virtues of a programmer: laziness, impatience, and hubris." -- Larry Wall</description>
	<lastBuildDate>Wed, 03 Mar 2010 21:56:22 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: akzhan</title>
		<link>http://avdi.org/devblog/2009/07/14/recursively-symbolize-keys/comment-page-1/#comment-833</link>
		<dc:creator>akzhan</dc:creator>
		<pubDate>Wed, 24 Feb 2010 13:23:53 +0000</pubDate>
		<guid isPermaLink="false">http://avdi.org/devblog/?p=213#comment-833</guid>
		<description>using each_pair is faster than inject (in my tests on ruby 1.8.7 EE.</description>
		<content:encoded><![CDATA[<p>using each_pair is faster than inject (in my tests on ruby 1.8.7 <span class="caps">EE.</span></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pjb3</title>
		<link>http://avdi.org/devblog/2009/07/14/recursively-symbolize-keys/comment-page-1/#comment-666</link>
		<dc:creator>pjb3</dc:creator>
		<pubDate>Tue, 21 Jul 2009 11:19:39 +0000</pubDate>
		<guid isPermaLink="false">http://avdi.org/devblog/?p=213#comment-666</guid>
		<description>I also like to have symbolize_keys be a method on Hash rather than passing the hash to symbolize_keys, otherwise it feels like Python :)&lt;br&gt;&lt;br&gt;Here it is with that and ternaries, which is a little more compact but I think still readable.&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://gist.github.com/151324&quot; rel=&quot;nofollow&quot;&gt;http://gist.github.com/151324&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>I also like to have symbolize_keys be a method on Hash rather than passing the hash to symbolize_keys, otherwise it feels like Python <img src='http://avdi.org/devblog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Here it is with that and ternaries, which is a little more compact but I think still readable.</p>
<p><a href="http://gist.github.com/151324" rel="nofollow">http://gist.github.com/151324</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: avdi</title>
		<link>http://avdi.org/devblog/2009/07/14/recursively-symbolize-keys/comment-page-1/#comment-665</link>
		<dc:creator>avdi</dc:creator>
		<pubDate>Wed, 15 Jul 2009 12:28:35 +0000</pubDate>
		<guid isPermaLink="false">http://avdi.org/devblog/?p=213#comment-665</guid>
		<description>Yeah, I know about the symbol syntax in YAML.  But a lot of YAML formats don&#039;t use it, presumably because the string syntax is more pleasant to read, and perhaps because insisting on adding the file&#039;s symbols to the system string table is arguably presumptuous.  Or maybe just because it&#039;s easy to forget to type that leading colon.&lt;br&gt;&lt;br&gt;A running theme in my work is solutions that don&#039;t require extending core classes, but there are certainly advantages to the module inclusion approach.</description>
		<content:encoded><![CDATA[<p>Yeah, I know about the symbol syntax in <span class="caps">YAML. </span> But a lot of <span class="caps">YAML </span>formats don&#39;t use it, presumably because the string syntax is more pleasant to read, and perhaps because insisting on adding the file&#39;s symbols to the system string table is arguably presumptuous.  Or maybe just because it&#39;s easy to forget to type that leading colon.</p>
<p>A running theme in my work is solutions that don&#39;t require extending core classes, but there are certainly advantages to the module inclusion approach.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Botanicus</title>
		<link>http://avdi.org/devblog/2009/07/14/recursively-symbolize-keys/comment-page-1/#comment-664</link>
		<dc:creator>Botanicus</dc:creator>
		<pubDate>Wed, 15 Jul 2009 12:21:07 +0000</pubDate>
		<guid isPermaLink="false">http://avdi.org/devblog/?p=213#comment-664</guid>
		<description>BTW you can also use symbols in YAML, just do something like that:&lt;br&gt;&lt;br&gt;---&lt;br&gt;:key: value&lt;br&gt;&lt;br&gt;About your example, I personally prefer to create SymbolizedKeysMixin, include it to the Hash class and use key.respond_to?(:symbolize_keys) rather than testing class of each key. So the only thing for supporting another classes will be e. g. Mash.send(:include, SymbolizedKeysMixin).</description>
		<content:encoded><![CDATA[<p><span class="caps">BTW </span>you can also use symbols in <span class="caps">YAML, </span>just do something like that:</p>
<p>&#8212;<br />:key: value</p>
<p>About your example, I personally prefer to create SymbolizedKeysMixin, include it to the Hash class and use key.respond_to?(:symbolize_keys) rather than testing class of each key. So the only thing for supporting another classes will be e. g. Mash.send(:include, SymbolizedKeysMixin).</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.405 seconds -->
