<?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:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: F# Pipelining in C#</title>
	<atom:link href="http://rogeralsing.com/2009/12/27/f-pipelining-in-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://rogeralsing.com/2009/12/27/f-pipelining-in-c/</link>
	<description></description>
	<lastBuildDate>Sat, 28 Jan 2012 14:35:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Alexey Romanov</title>
		<link>http://rogeralsing.com/2009/12/27/f-pipelining-in-c/#comment-1430</link>
		<dc:creator><![CDATA[Alexey Romanov]]></dc:creator>
		<pubDate>Sat, 02 Jan 2010 23:55:44 +0000</pubDate>
		<guid isPermaLink="false">http://rogeralsing.com/?p=723#comment-1430</guid>
		<description><![CDATA[Lost generics again.]]></description>
		<content:encoded><![CDATA[<p>Lost generics again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexey Romanov</title>
		<link>http://rogeralsing.com/2009/12/27/f-pipelining-in-c/#comment-1429</link>
		<dc:creator><![CDATA[Alexey Romanov]]></dc:creator>
		<pubDate>Sat, 02 Jan 2010 23:54:16 +0000</pubDate>
		<guid isPermaLink="false">http://rogeralsing.com/?p=723#comment-1429</guid>
		<description><![CDATA[Algebraic data types:

F#:
&lt;pre&gt;
type &#039;a &#039;b optfun = 
  &#124; Konst of &#039;b
  &#124; Fun of (&#039;a -&gt; &#039;b)

...
let x = Konst 0
&lt;/pre&gt;
C#:
&lt;pre&gt;
abstract public class OptFun&lt;A&gt; {
    public sealed class Konst {
        B Value {get; private set;}
        public Konst(B value) { Value = value; }
    }
    public sealed class Fun {
        Func&lt;A&gt; Func {get; private set;}
        public Konst(Func&lt;A&gt; func) { Func = func; }
    }

// You get to implement your own Equals, ==, !=, GetHashCode, comparison (not in this case)
// again, once you want to pattern match on two values, you are in trouble.
}

...
OptFun x = new OptFun.Konst(0)
// or at best
var x = OptFun.Konst(0)
&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>Algebraic data types:</p>
<p>F#:</p>
<pre>
type 'a 'b optfun =
  | Konst of 'b
  | Fun of ('a -&gt; 'b)

...
let x = Konst 0
</pre>
<p>C#:</p>
<pre>
abstract public class OptFun<a> {
    public sealed class Konst {
        B Value {get; private set;}
        public Konst(B value) { Value = value; }
    }
    public sealed class Fun {
        Func</a><a> Func {get; private set;}
        public Konst(Func</a><a> func) { Func = func; }
    }

// You get to implement your own Equals, ==, !=, GetHashCode, comparison (not in this case)
// again, once you want to pattern match on two values, you are in trouble.
}

...
OptFun x = new OptFun.Konst(0)
// or at best
var x = OptFun.Konst(0)
</a></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: simi</title>
		<link>http://rogeralsing.com/2009/12/27/f-pipelining-in-c/#comment-1425</link>
		<dc:creator><![CDATA[simi]]></dc:creator>
		<pubDate>Wed, 30 Dec 2009 09:28:05 +0000</pubDate>
		<guid isPermaLink="false">http://rogeralsing.com/?p=723#comment-1425</guid>
		<description><![CDATA[hi,

First of all. Thanks very much for your useful post.

I just came across your blog and wanted to drop you a note telling you how impressed I 

was with the information you have posted here.

Please let me introduce you some info related to this post and I hope that it is useful 

for .Net community.

There is a good C# resource site, Have alook
 
http://www.csharptalk.com

simi]]></description>
		<content:encoded><![CDATA[<p>hi,</p>
<p>First of all. Thanks very much for your useful post.</p>
<p>I just came across your blog and wanted to drop you a note telling you how impressed I </p>
<p>was with the information you have posted here.</p>
<p>Please let me introduce you some info related to this post and I hope that it is useful </p>
<p>for .Net community.</p>
<p>There is a good C# resource site, Have alook</p>
<p><a href="http://www.csharptalk.com" rel="nofollow">http://www.csharptalk.com</a></p>
<p>simi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://rogeralsing.com/2009/12/27/f-pipelining-in-c/#comment-1412</link>
		<dc:creator><![CDATA[Michael]]></dc:creator>
		<pubDate>Sun, 27 Dec 2009 21:53:22 +0000</pubDate>
		<guid isPermaLink="false">http://rogeralsing.com/?p=723#comment-1412</guid>
		<description><![CDATA[In my humble opinion, both F# and C# snippets here are not readable at all. (with C# being slightly better).]]></description>
		<content:encoded><![CDATA[<p>In my humble opinion, both F# and C# snippets here are not readable at all. (with C# being slightly better).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexey Romanov</title>
		<link>http://rogeralsing.com/2009/12/27/f-pipelining-in-c/#comment-1411</link>
		<dc:creator><![CDATA[Alexey Romanov]]></dc:creator>
		<pubDate>Sun, 27 Dec 2009 21:43:58 +0000</pubDate>
		<guid isPermaLink="false">http://rogeralsing.com/?p=723#comment-1411</guid>
		<description><![CDATA[Argh, the formatting is messed up there. Hopefully you get the idea.]]></description>
		<content:encoded><![CDATA[<p>Argh, the formatting is messed up there. Hopefully you get the idea.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alexey Romanov</title>
		<link>http://rogeralsing.com/2009/12/27/f-pipelining-in-c/#comment-1410</link>
		<dc:creator><![CDATA[Alexey Romanov]]></dc:creator>
		<pubDate>Sun, 27 Dec 2009 21:35:20 +0000</pubDate>
		<guid isPermaLink="false">http://rogeralsing.com/?p=723#comment-1410</guid>
		<description><![CDATA[Pattern matching:

let rec zip la lb =
  match (la, lb) with
  &#124; (ha::ta), (hb::tb) -&gt; (ha, hb) :: (zipWith func ta tb)
  &#124; _ -&gt; []

Pattern matching on one argument can look nice in C# (not as nice as in F#, IMHO), but on several arguments at once you are going to have a problem.

The closest I can come up with is (FList is a functional list class):

FList&lt;Tuple&lt;A&gt;&gt; Zip&lt;A&gt;(FList&lt;A&gt; la, FList&lt;B&gt; lb)
{
  return la.Match(() =&gt; FList&lt;Tuple&lt;A&gt;&gt;.Empty,
    (ha, ta) =&gt; lb.Match(() =&gt; FList&lt;Tuple&lt;A&gt;&gt;.Empty,
    (hb, tb) =&gt; Tuple.New(ha, hb).Cons(Zip(la, lb))));
}

which looks _a lot_ worse to me. And this is a very simple pattern match...

Full type inference.

I&#039;d add first-class events, but Reactive Framework will be available for all languages, so I won&#039;t.]]></description>
		<content:encoded><![CDATA[<p>Pattern matching:</p>
<p>let rec zip la lb =<br />
  match (la, lb) with<br />
  | (ha::ta), (hb::tb) -&gt; (ha, hb) :: (zipWith func ta tb)<br />
  | _ -&gt; []</p>
<p>Pattern matching on one argument can look nice in C# (not as nice as in F#, IMHO), but on several arguments at once you are going to have a problem.</p>
<p>The closest I can come up with is (FList is a functional list class):</p>
<p>FList&lt;Tuple&lt;A&gt;&gt; Zip&lt;A&gt;(FList&lt;A&gt; la, FList&lt;B&gt; lb)<br />
{<br />
  return la.Match(() =&gt; FList&lt;Tuple&lt;A&gt;&gt;.Empty,<br />
    (ha, ta) =&gt; lb.Match(() =&gt; FList&lt;Tuple&lt;A&gt;&gt;.Empty,<br />
    (hb, tb) =&gt; Tuple.New(ha, hb).Cons(Zip(la, lb))));<br />
}</p>
<p>which looks _a lot_ worse to me. And this is a very simple pattern match&#8230;</p>
<p>Full type inference.</p>
<p>I&#8217;d add first-class events, but Reactive Framework will be available for all languages, so I won&#8217;t.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

