<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Adventures in F#--Tail Recursion in Three Languages</title><link>http://blogs.msdn.com/jomo_fisher/archive/2007/09/19/adventures-in-f-tail-recursion-in-three-languages.aspx</link><description>Jomo Fisher—Here’s the F# I'm looking at today: #light let rec f n = do printf "%d\n" n f (n+1) f 1 This defines a recursive function 'f' that takes a value 'n' as a parameter. This function prints the value of n to the console and then calls itself with</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Adventures in F#--Tail Recursion in Three Languages</title><link>http://blogs.msdn.com/jomo_fisher/archive/2007/09/19/adventures-in-f-tail-recursion-in-three-languages.aspx#5001015</link><pubDate>Wed, 19 Sep 2007 23:04:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5001015</guid><dc:creator>Bart De Smet</dc:creator><description>&lt;p&gt;Hi Jomo,&lt;/p&gt;
&lt;p&gt;I posted about this topic (C# -&amp;gt; CLI/IL) somewhere in the past, so I though it might be useful for your readers to check this link out as well:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://community.bartdesmet.net/blogs/bart/archive/2006/09/22/4463.aspx"&gt;http://community.bartdesmet.net/blogs/bart/archive/2006/09/22/4463.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;-Bart&lt;/p&gt;</description></item><item><title>re: Adventures in F#--Tail Recursion in Three Languages</title><link>http://blogs.msdn.com/jomo_fisher/archive/2007/09/19/adventures-in-f-tail-recursion-in-three-languages.aspx#5007496</link><pubDate>Thu, 20 Sep 2007 09:34:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5007496</guid><dc:creator>Finnsson</dc:creator><description>&lt;p&gt;Intresting post. I always thought that F# used something like &amp;quot;OpCodes.Tailcall&amp;quot; (see &lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/system.reflection.emit.opcodes.tailcall"&gt;http://msdn2.microsoft.com/en-us/library/system.reflection.emit.opcodes.tailcall&lt;/a&gt;(VS.80).aspx) since that makes it possible to also optimize cases like:&lt;/p&gt;
&lt;p&gt;let f1 a&lt;/p&gt;
&lt;p&gt; &amp;nbsp;do print a&lt;/p&gt;
&lt;p&gt; &amp;nbsp;f2 a&lt;/p&gt;
&lt;p&gt;let f2 a&lt;/p&gt;
&lt;p&gt; &amp;nbsp;do print a&lt;/p&gt;
&lt;p&gt; &amp;nbsp;f1 a&lt;/p&gt;
&lt;p&gt;f1 1&lt;/p&gt;</description></item><item><title>re: Adventures in F#--Tail Recursion in Three Languages</title><link>http://blogs.msdn.com/jomo_fisher/archive/2007/09/19/adventures-in-f-tail-recursion-in-three-languages.aspx#5011903</link><pubDate>Thu, 20 Sep 2007 16:11:11 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5011903</guid><dc:creator>Samuel Jack</dc:creator><description>&lt;p&gt;Re: your last paragraph. Since C# is making the functional model available, will you be considering including this tail-call optimisation in future versions?&lt;/p&gt;</description></item><item><title>re: Adventures in F#--Tail Recursion in Three Languages</title><link>http://blogs.msdn.com/jomo_fisher/archive/2007/09/19/adventures-in-f-tail-recursion-in-three-languages.aspx#5019515</link><pubDate>Fri, 21 Sep 2007 00:46:36 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5019515</guid><dc:creator>Jomo Fisher</dc:creator><description>&lt;p&gt;Samuel,&lt;/p&gt;
&lt;p&gt;There was some enthusiasm for this the last time I brought it up with Doctor T (&lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/madst/default.aspx"&gt;http://blogs.msdn.com/madst/default.aspx&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;The optimization won't be in Orcas for sure. Beyond that, I can't say. If we did do it, I still think it makes sense to do it in the jitter.&lt;/p&gt;
</description></item><item><title>Adventures in F#--Corecursion</title><link>http://blogs.msdn.com/jomo_fisher/archive/2007/09/19/adventures-in-f-tail-recursion-in-three-languages.aspx#5102165</link><pubDate>Mon, 24 Sep 2007 20:09:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5102165</guid><dc:creator>Jomo Fisher -- C#, LINQ and Whatnot</dc:creator><description>&lt;p&gt;Jomo Fisher--In a prior post I touched on recursion in F#. One of the comments was about mutually recursive&lt;/p&gt;
</description></item><item><title>re: Adventures in F#--Tail Recursion in Three Languages</title><link>http://blogs.msdn.com/jomo_fisher/archive/2007/09/19/adventures-in-f-tail-recursion-in-three-languages.aspx#5109892</link><pubDate>Tue, 25 Sep 2007 04:09:26 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5109892</guid><dc:creator>jliettehk</dc:creator><description>&lt;P&gt;Hi Jomo,&lt;/P&gt;
&lt;P&gt;Like most of us, I followed a link from the official C# Visual page to your post. Discovered your "Adventures in F#" series. Very good. Is there a link between C# &amp;amp; F# ?&lt;/P&gt;
&lt;P&gt;The technical answer is threefold : generics, LINQ and lambda. The corporate answer is : both issued by microsoft. The networking answer is : people are supposed to know each other (Don Syme from F# has worked on generics ; the new feature of C#2 3 years ago).&lt;/P&gt;
&lt;P&gt;So my question is : as a member of C# team, you seem to depict your "adventures" as if it was in a foreign world. Are you this lonesome cowboy/pionneer visiting a desolated valley ?&lt;/P&gt;
&lt;P&gt;Please take your phone, call F# team for a meeting, set up a high return best-of-both-worlds project and be the main contributor of C#4.&lt;/P&gt;
&lt;P&gt;We, C# end users, are delighted by C#3 in beta 2 : LINQ, var, lambda. It simplifies the code (shorter/less verbose) and makes it more robust. We expect another simplification in delegates, interfaces, inheritance, polymorphism, virtuals,is/as. In short : level 2 concepts of Object/Classes programming. Ocaml team did not do too well with objects (it was 15 years ago). Will you do better ?&lt;/P&gt;
&lt;P&gt;Thanks for your fantastic work.&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description></item><item><title>re: Adventures in F#--Tail Recursion in Three Languages</title><link>http://blogs.msdn.com/jomo_fisher/archive/2007/09/19/adventures-in-f-tail-recursion-in-three-languages.aspx#5178716</link><pubDate>Fri, 28 Sep 2007 06:41:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5178716</guid><dc:creator>MichaelGiagnocavo</dc:creator><description>&lt;P&gt;Regardless of where it technically is done, the C# spec needs to explicitly say that tail calls will be optimized out, otherwise it's a nearly useless feature since we can't rely on it.&lt;/P&gt;</description></item><item><title>Adventures in F#--Sweet Test-First Kung Fu</title><link>http://blogs.msdn.com/jomo_fisher/archive/2007/09/19/adventures-in-f-tail-recursion-in-three-languages.aspx#5248608</link><pubDate>Wed, 03 Oct 2007 01:38:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:5248608</guid><dc:creator>Jomo Fisher -- C#, LINQ and Whatnot</dc:creator><description>&lt;p&gt;Jomo Fisher--Up until now, I've been avoiding using F# with the VS IDE. I've been using notepad.exe and&lt;/p&gt;
</description></item><item><title>Immutability and tail recursion</title><link>http://blogs.msdn.com/jomo_fisher/archive/2007/09/19/adventures-in-f-tail-recursion-in-three-languages.aspx#8433666</link><pubDate>Mon, 28 Apr 2008 04:49:04 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8433666</guid><dc:creator>CodeThinked</dc:creator><description>&lt;p&gt;Immutability and tail recursion&lt;/p&gt;
</description></item><item><title>Recursing into Linear, Tail and Binary Recursion</title><link>http://blogs.msdn.com/jomo_fisher/archive/2007/09/19/adventures-in-f-tail-recursion-in-three-languages.aspx#8702558</link><pubDate>Mon, 07 Jul 2008 19:31:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8702558</guid><dc:creator>Matthew Podwysocki</dc:creator><description>&lt;p&gt;In my previous post , I talked about some of the basics of recursion and why you might want to use it&lt;/p&gt;
</description></item><item><title>Recursing into Linear, Tail and Binary Recursion</title><link>http://blogs.msdn.com/jomo_fisher/archive/2007/09/19/adventures-in-f-tail-recursion-in-three-languages.aspx#8702660</link><pubDate>Mon, 07 Jul 2008 19:42:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8702660</guid><dc:creator>Matthew Podwysocki's Blog</dc:creator><description>&lt;p&gt;In my previous post , I talked about some of the basics of recursion and why you might want to use it&lt;/p&gt;
</description></item><item><title>Recursing into Linear, Tail and Binary Recursion</title><link>http://blogs.msdn.com/jomo_fisher/archive/2007/09/19/adventures-in-f-tail-recursion-in-three-languages.aspx#8718758</link><pubDate>Fri, 11 Jul 2008 00:36:06 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8718758</guid><dc:creator>Community Blogs</dc:creator><description>&lt;p&gt;In my previous post , I talked about some of the basics of recursion and why you might want to use it&lt;/p&gt;
</description></item></channel></rss>