<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>NotRocketSurgery: Symbol#to_proc: hack or syntactical sugar?</title>
    <link>http://notrocketsurgery.com/articles/2006/08/28/symbol-to_proc-hack-or-syntactical-sugar</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Relax.</description>
    <item>
      <title>Symbol#to_proc: hack or syntactical sugar?</title>
      <description>&lt;p&gt;This article &lt;a href="http://rubyjudo.com/2006/8/28/symbol-to_proc-hack-or-syntactical-sugar"&gt;has moved&lt;/a&gt; over to our sister spin-off blog, &lt;a href="http://rubyjudo.com"&gt;RubyJudo&lt;/a&gt;, which focuses on more arcane technical topics than NotRocketSurgery.&lt;/p&gt;</description>
      <pubDate>Mon, 28 Aug 2006 23:18:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:965cb414-08cf-4d2e-882e-2b16e2d7675d</guid>
      <author>jd</author>
      <link>http://notrocketsurgery.com/articles/2006/08/28/symbol-to_proc-hack-or-syntactical-sugar</link>
      <category>syntacticalsugar</category>
      <category>ruby</category>
    </item>
    <item>
      <title>"Symbol#to_proc: hack or syntactical sugar?" by Ryan Norbauer</title>
      <description>&lt;p&gt;Why couldn&amp;#8217;t they implement something like the following instead?&lt;/p&gt;


	&lt;p&gt;StupidUsers.each.destroy&lt;/p&gt;


	&lt;p&gt;It would be harder to do, but it would make much more sense, semantically than:&lt;/p&gt;


	&lt;p&gt;StupidUsers.each(&amp;#38;:destroy)&lt;/p&gt;


	&lt;p&gt;There&amp;#8217;s probably some technical hurdle I&amp;#8217;m not seeing here, but couldn&amp;#8217;t one just rewrite each to proxy whatever method you&amp;#8217;re sending it over to every object in the collection?&lt;/p&gt;


	&lt;p&gt;It definitely would follow Matz&amp;#8217;s putative &lt;a href="http://www.artima.com/intv/rubyP.html" rel="nofollow"&gt;principle of least surprise&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Wed, 15 Nov 2006 15:37:48 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:3cba316d-c882-472b-b2c0-e3c004f87d6d</guid>
      <link>http://notrocketsurgery.com/articles/2006/08/28/symbol-to_proc-hack-or-syntactical-sugar#comment-96</link>
    </item>
    <item>
      <title>"Symbol#to_proc: hack or syntactical sugar?" by Bob Silva</title>
      <description>&lt;p&gt;Hi jd,&lt;/p&gt;


	&lt;p&gt;I kinda agree with you that it shouldn&amp;#8217;t be in Rails. It was cool hackery when first introduced but at what cost to understanding the code?&lt;/p&gt;


	&lt;p&gt;Bob&lt;/p&gt;</description>
      <pubDate>Tue, 17 Oct 2006 10:28:34 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:028a5e5e-e21e-4340-8e9c-408d56b3e9e3</guid>
      <link>http://notrocketsurgery.com/articles/2006/08/28/symbol-to_proc-hack-or-syntactical-sugar#comment-76</link>
    </item>
    <item>
      <title>"Symbol#to_proc: hack or syntactical sugar?" by Ryan Norbauer</title>
      <description>&lt;p&gt;Hi JD,&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m so glad to see you post this.  I was wondering if I was the only one who thought this was a bit of an ugly hack.&lt;/p&gt;


	&lt;p&gt;Something makes me definitely uneasy about it, in ways that other Ruby syntactical sugar doesn&amp;#8217;t.&lt;/p&gt;


	&lt;p&gt;I could see it being useful, but it just doesn&amp;#8217;t seem &amp;#8220;conceptually appropriate.&amp;#8221;  Given how much attention has been paid to readability in Ruby and Rails, I wonder what the point of making this one aberrant hack was.&lt;/p&gt;</description>
      <pubDate>Wed, 30 Aug 2006 15:06:25 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:76b29967-54a9-4a61-b45b-8b5f041f4b13</guid>
      <link>http://notrocketsurgery.com/articles/2006/08/28/symbol-to_proc-hack-or-syntactical-sugar#comment-50</link>
    </item>
  </channel>
</rss>
