<?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: Implicit Conversions: More Powerful than Dynamic Typing?</title>
	<atom:link href="http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing/feed" rel="self" type="application/rss+xml" />
	<link>http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing</link>
	<description>(permanently in beta)</description>
	<lastBuildDate>Sun, 29 Aug 2010 20:01:44 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: jmalcolm</title>
		<link>http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing/comment-page-1#comment-5117</link>
		<dc:creator>jmalcolm</dc:creator>
		<pubDate>Tue, 27 Jul 2010 19:25:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing#comment-5117</guid>
		<description>I believe that the proposed Java extension methods are indeed similar to the C# equivalent that exists today.  However, unless I missed something, I would think that extension methods are much more akin to method implementations in traits than to implicit type conversions.

Both features can play well together of course.</description>
		<content:encoded><![CDATA[<p>I believe that the proposed Java extension methods are indeed similar to the C# equivalent that exists today.  However, unless I missed something, I would think that extension methods are much more akin to method implementations in traits than to implicit type conversions.</p>
<p>Both features can play well together of course.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reg Braithwaite</title>
		<link>http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing/comment-page-1#comment-4085</link>
		<dc:creator>Reg Braithwaite</dc:creator>
		<pubDate>Thu, 02 Oct 2008 14:18:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing#comment-4085</guid>
		<description>&quot;I don’t particularly like defining methods using define_method and a block (it’s a memory leak waiting to happen)&quot; =&gt; Funny thing, I have some issues with it as well, but from time to time I think about a hypothetical language called &quot;R&quot; where &quot;R is to Ruby as Scheme is to Common Lisp.&quot;

In R, all blocks are full closures and that&#039;s also the only way to define a method, no messy three and four ways to do the same thing :-)</description>
		<content:encoded><![CDATA[<p>&#8220;I don’t particularly like defining methods using define_method and a block (it’s a memory leak waiting to happen)&#8221; =&gt; Funny thing, I have some issues with it as well, but from time to time I think about a hypothetical language called &#8220;R&#8221; where &#8220;R is to Ruby as Scheme is to Common Lisp.&#8221;</p>
<p>In R, all blocks are full closures and that&#8217;s also the only way to define a method, no messy three and four ways to do the same thing <img src='http://www.codecommit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Spiewak</title>
		<link>http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing/comment-page-1#comment-4084</link>
		<dc:creator>Daniel Spiewak</dc:creator>
		<pubDate>Thu, 02 Oct 2008 01:41:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing#comment-4084</guid>
		<description>Interesting, I wasn&#039;t aware that you could capture a method reference in that fashion.  It certainly does solve the problem of name collision.  I don&#039;t particularly like defining methods using define_method and a block (it&#039;s a memory leak waiting to happen), but it makes sense here and I can&#039;t think of any horrendous consequences.  Thanks for the heads up!  :-)</description>
		<content:encoded><![CDATA[<p>Interesting, I wasn&#8217;t aware that you could capture a method reference in that fashion.  It certainly does solve the problem of name collision.  I don&#8217;t particularly like defining methods using define_method and a block (it&#8217;s a memory leak waiting to happen), but it makes sense here and I can&#8217;t think of any horrendous consequences.  Thanks for the heads up!  <img src='http://www.codecommit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reg Braithwaite</title>
		<link>http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing/comment-page-1#comment-4083</link>
		<dc:creator>Reg Braithwaite</dc:creator>
		<pubDate>Thu, 02 Oct 2008 00:03:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing#comment-4083</guid>
		<description>If you google &quot;ruby alias,&quot; the very first hit is:

http://blog.jayfields.com/2006/12/ruby-alias-method-alternative.html

Which addresses the mess that is unhygienic method aliasing in a manner that is isomorphic to a very old way to deal with variable captures in Lisp macros. And quite honestly, there are other things you can do to solve the problem you are posing in a Rubyesque way without rewriting (although for some reason rewriting comes to my mind).

But I think there&#039;s an interesting point you are making about implicit conversions, so I really don&#039;t want to go too far down the road of debating what I would do in Ruby if I wanted to accomplish the same thing. I am a fan of static typing for enforcing domain constraints on programs, and some of these metaprogramming-like concepts are delightful to explore.</description>
		<content:encoded><![CDATA[<p>If you google &#8220;ruby alias,&#8221; the very first hit is:</p>
<p><a href="http://blog.jayfields.com/2006/12/ruby-alias-method-alternative.html" rel="nofollow">http://blog.jayfields.com/2006/12/ruby-alias-method-alternative.html</a></p>
<p>Which addresses the mess that is unhygienic method aliasing in a manner that is isomorphic to a very old way to deal with variable captures in Lisp macros. And quite honestly, there are other things you can do to solve the problem you are posing in a Rubyesque way without rewriting (although for some reason rewriting comes to my mind).</p>
<p>But I think there&#8217;s an interesting point you are making about implicit conversions, so I really don&#8217;t want to go too far down the road of debating what I would do in Ruby if I wanted to accomplish the same thing. I am a fan of static typing for enforcing domain constraints on programs, and some of these metaprogramming-like concepts are delightful to explore.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Spiewak</title>
		<link>http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing/comment-page-1#comment-4082</link>
		<dc:creator>Daniel Spiewak</dc:creator>
		<pubDate>Wed, 01 Oct 2008 16:47:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing#comment-4082</guid>
		<description>@Reg

I spent some time Googling, and I&#039;m afraid I still don&#039;t know what you mean by &quot;several far superior ways&quot;.  I am of course aware of ParseTree, but I wanted to show the problems with such overriding without tapping the power of rewritable S-expressions.  I am truly unaware of any substantively different method for accomplishing the Fixnum &lt; override.

I will agree that it is a poor example of Ruby though.  :-)  I deliberately went after an example which had type-dependent behavior.  Ruby is *never* going to behave as nicely as a static language in that case.</description>
		<content:encoded><![CDATA[<p>@Reg</p>
<p>I spent some time Googling, and I&#8217;m afraid I still don&#8217;t know what you mean by &#8220;several far superior ways&#8221;.  I am of course aware of ParseTree, but I wanted to show the problems with such overriding without tapping the power of rewritable S-expressions.  I am truly unaware of any substantively different method for accomplishing the Fixnum < override.</p>
<p>I will agree that it is a poor example of Ruby though.  <img src='http://www.codecommit.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   I deliberately went after an example which had type-dependent behavior.  Ruby is *never* going to behave as nicely as a static language in that case.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Reg Braithwaite</title>
		<link>http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing/comment-page-1#comment-4081</link>
		<dc:creator>Reg Braithwaite</dc:creator>
		<pubDate>Wed, 01 Oct 2008 12:04:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing#comment-4081</guid>
		<description>A good read, thank you. That being said, your Ruby example is not representative of how to go about overriding or extending methods. I would go so far as to say it is a very poor example of Ruby metaprogramming ,period. These comments are not the place for code examples, but if you care to google the subject for a few minutes, you will come up with several far superior ways solve this problem in Ruby.

Still an interesting point about the benefits of static analysis, though.</description>
		<content:encoded><![CDATA[<p>A good read, thank you. That being said, your Ruby example is not representative of how to go about overriding or extending methods. I would go so far as to say it is a very poor example of Ruby metaprogramming ,period. These comments are not the place for code examples, but if you care to google the subject for a few minutes, you will come up with several far superior ways solve this problem in Ruby.</p>
<p>Still an interesting point about the benefits of static analysis, though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel Spiewak</title>
		<link>http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing/comment-page-1#comment-4064</link>
		<dc:creator>Daniel Spiewak</dc:creator>
		<pubDate>Wed, 24 Sep 2008 17:11:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing#comment-4064</guid>
		<description>@David

I wanted to provide a link right in the article, but I couldn&#039;t find it.  Seriously, I spent a good two hours Googling around to no avail.</description>
		<content:encoded><![CDATA[<p>@David</p>
<p>I wanted to provide a link right in the article, but I couldn&#8217;t find it.  Seriously, I spent a good two hours Googling around to no avail.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Gates</title>
		<link>http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing/comment-page-1#comment-4063</link>
		<dc:creator>David Gates</dc:creator>
		<pubDate>Wed, 24 Sep 2008 12:02:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing#comment-4063</guid>
		<description>&quot;One of the most surprising things I’ve ever read about Scala came in the form of a (mostly positive) review article.&quot;

Could we get a link to said article?</description>
		<content:encoded><![CDATA[<p>&#8220;One of the most surprising things I’ve ever read about Scala came in the form of a (mostly positive) review article.&#8221;</p>
<p>Could we get a link to said article?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim McBeath</title>
		<link>http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing/comment-page-1#comment-4040</link>
		<dc:creator>Jim McBeath</dc:creator>
		<pubDate>Thu, 18 Sep 2008 01:39:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing#comment-4040</guid>
		<description>I think one of the key points, which you did not quite explicitly state,  is that you can precisely control the scope of implicit conversions in Scala.  Thus if you are creating an implicit conversion which could potentially cause problems in code not expecting it, such as your unusual less-than example, you can define the implicit conversions in (or import them into) only the class or block of code where you need them.</description>
		<content:encoded><![CDATA[<p>I think one of the key points, which you did not quite explicitly state,  is that you can precisely control the scope of implicit conversions in Scala.  Thus if you are creating an implicit conversion which could potentially cause problems in code not expecting it, such as your unusual less-than example, you can define the implicit conversions in (or import them into) only the class or block of code where you need them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Nischt</title>
		<link>http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing/comment-page-1#comment-4035</link>
		<dc:creator>Michael Nischt</dc:creator>
		<pubDate>Tue, 16 Sep 2008 16:53:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.codecommit.com/blog/ruby/implicit-conversions-more-powerful-than-dynamic-typing#comment-4035</guid>
		<description>ok, I&#039;m not able to post code so please have a look at the areEqual method and see why I dislike Scala&#039;s implicit conversions:

http://gestalt.monoid.net/stuffu/ImplicitOrdered.scala

The problem is that a conversion takes place if and only if a matching method is not present. However in some cases it should convert, if the target type of the conversion has a matching method (even if the other has too).</description>
		<content:encoded><![CDATA[<p>ok, I&#8217;m not able to post code so please have a look at the areEqual method and see why I dislike Scala&#8217;s implicit conversions:</p>
<p><a href="http://gestalt.monoid.net/stuffu/ImplicitOrdered.scala" rel="nofollow">http://gestalt.monoid.net/stuffu/ImplicitOrdered.scala</a></p>
<p>The problem is that a conversion takes place if and only if a matching method is not present. However in some cases it should convert, if the target type of the conversion has a matching method (even if the other has too).</p>
]]></content:encoded>
	</item>
</channel>
</rss>
