<?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>A C# library to write functional code - Part IV - Type Unions</title><link>http://blogs.msdn.com/lucabol/archive/2008/06/06/a-c-library-to-write-functional-code-part-iv-type-unions.aspx</link><description>Other posts in the series: Part I - Background Part II - Tuples Part III - Records Part IV - Type Unions Part V - The Match operator I'm sorry for my prolonged absence in the middle of this series of posts. I'm on a long paternity leave in Italy (playing</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Luca Bolognese's WebLog : A C# library to write functional code - Part I - Background</title><link>http://blogs.msdn.com/lucabol/archive/2008/06/06/a-c-library-to-write-functional-code-part-iv-type-unions.aspx#8577269</link><pubDate>Fri, 06 Jun 2008 11:49:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8577269</guid><dc:creator>Luca Bolognese's WebLog : A C# library to write functional code - Part I - Background</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://blogs.msdn.com/lucabol/archive/2008/04/01/a-c-library-to-write-functional-code-part-i-background.aspx"&gt;http://blogs.msdn.com/lucabol/archive/2008/04/01/a-c-library-to-write-functional-code-part-i-background.aspx&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: A C# library to write functional code - Part IV - Type Unions</title><link>http://blogs.msdn.com/lucabol/archive/2008/06/06/a-c-library-to-write-functional-code-part-iv-type-unions.aspx#8578228</link><pubDate>Fri, 06 Jun 2008 18:42:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8578228</guid><dc:creator>Jared Parsons</dc:creator><description>&lt;p&gt;I'm curious as why you chose to inherit from Record as opposed to using it as a member variable. &amp;nbsp;From your example it doesn't look like a TypeUnion &amp;quot;is&amp;quot; a Record so much as it uses a Record. &amp;nbsp;&lt;/p&gt;
</description></item><item><title>re: A C# library to write functional code - Part IV - Type Unions</title><link>http://blogs.msdn.com/lucabol/archive/2008/06/06/a-c-library-to-write-functional-code-part-iv-type-unions.aspx#8585265</link><pubDate>Mon, 09 Jun 2008 14:57:58 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8585265</guid><dc:creator>lucabol</dc:creator><description>&lt;p&gt;I cannot recall the reason, if there ever was one.&lt;/p&gt;
&lt;p&gt;On the face of it, you are right.&lt;/p&gt;
</description></item><item><title>re: A C# library to write functional code - Part IV - Type Unions</title><link>http://blogs.msdn.com/lucabol/archive/2008/06/06/a-c-library-to-write-functional-code-part-iv-type-unions.aspx#8587708</link><pubDate>Tue, 10 Jun 2008 01:35:32 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8587708</guid><dc:creator>configurator</dc:creator><description>&lt;p&gt;To access the type union you use the Is and As operator. That means that the usage of Type1 and Type2 in the record is not needed.&lt;/p&gt;
&lt;p&gt;You can simply keep the value in a member object-type field. Then, you would simplify the code of As&amp;lt;&amp;gt; and not really much change anything else - except the constantly unused memory slot.&lt;/p&gt;
&lt;p&gt;Also, you would be more efficient because the cast to object would be unnecessary. The only two things that would enforce or use the given types would be the constructor - which would only use the given types - and the match operator.&lt;/p&gt;
&lt;p&gt;Just my two pence.&lt;/p&gt;
</description></item><item><title>re: A C# library to write functional code - Part IV - Type Unions</title><link>http://blogs.msdn.com/lucabol/archive/2008/06/06/a-c-library-to-write-functional-code-part-iv-type-unions.aspx#8591275</link><pubDate>Wed, 11 Jun 2008 15:52:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8591275</guid><dc:creator>santhiran</dc:creator><description>&lt;p&gt;hi&lt;/p&gt;
&lt;p&gt;very nice your teachinfg methosd pls sent all C# programming learn tools&lt;/p&gt;
&lt;p&gt;Thank You&lt;/p&gt;
</description></item><item><title>re: A C# library to write functional code - Part IV - Type Unions</title><link>http://blogs.msdn.com/lucabol/archive/2008/06/06/a-c-library-to-write-functional-code-part-iv-type-unions.aspx#8613584</link><pubDate>Wed, 18 Jun 2008 05:21:07 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8613584</guid><dc:creator>Coder</dc:creator><description>&lt;p&gt;How can it be useful?! Does anybody have a real-world example?&lt;/p&gt;
</description></item><item><title>Mr.</title><link>http://blogs.msdn.com/lucabol/archive/2008/06/06/a-c-library-to-write-functional-code-part-iv-type-unions.aspx#8652249</link><pubDate>Wed, 25 Jun 2008 17:36:42 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8652249</guid><dc:creator>Strange Cat</dc:creator><description>&lt;p&gt;Good to know lots of italian work for Microsoft :)&lt;/p&gt;
&lt;p&gt;Ciao&lt;/p&gt;
</description></item><item><title>re: A C# library to write functional code - Part IV - Type Unions</title><link>http://blogs.msdn.com/lucabol/archive/2008/06/06/a-c-library-to-write-functional-code-part-iv-type-unions.aspx#8661450</link><pubDate>Fri, 27 Jun 2008 15:15:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8661450</guid><dc:creator>Hasan Naqvi</dc:creator><description>&lt;p&gt;nice but wud u please tell us the usage of type unions in real world scenerios.&lt;/p&gt;
</description></item><item><title>re: A C# library to write functional code - Part IV - Type Unions</title><link>http://blogs.msdn.com/lucabol/archive/2008/06/06/a-c-library-to-write-functional-code-part-iv-type-unions.aspx#8671543</link><pubDate>Mon, 30 Jun 2008 18:00:46 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8671543</guid><dc:creator>Humberto Moreno</dc:creator><description>&lt;p&gt;I think it would be a good idea to extend the base class to support not just two types, but multiple types. - Btw. I agree with Jared Parsons suggestion.&lt;/p&gt;
&lt;p&gt;Overall it's a good idea. Thanks&lt;/p&gt;
</description></item><item><title>A C# library to write functional code - Part V - The Match operator</title><link>http://blogs.msdn.com/lucabol/archive/2008/06/06/a-c-library-to-write-functional-code-part-iv-type-unions.aspx#8732832</link><pubDate>Tue, 15 Jul 2008 12:46:25 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8732832</guid><dc:creator>Luca Bolognese's WebLog</dc:creator><description>&lt;p&gt;Other posts in the series: Part I - Background Part II - Tuples Part III - Records Part IV - Type Unions&lt;/p&gt;
</description></item></channel></rss>