<?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>Units of Measure in F#: Part Three, Generic Units</title><link>http://blogs.msdn.com/andrewkennedy/archive/2008/09/04/units-of-measure-in-f-part-three-generic-units.aspx</link><description>In the first two articles in this series, we saw how to declare base and derived units, introduce constants with units, define our own conversion functions, and have F# check the units for us. But what if we're writing code that doesn't care what units</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Dew Drop - September 5, 2008 | Alvin Ashcraft's Morning Dew</title><link>http://blogs.msdn.com/andrewkennedy/archive/2008/09/04/units-of-measure-in-f-part-three-generic-units.aspx#8926214</link><pubDate>Fri, 05 Sep 2008 15:07:27 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8926214</guid><dc:creator>Dew Drop - September 5, 2008 | Alvin Ashcraft's Morning Dew</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://www.alvinashcraft.com/2008/09/05/dew-drop-september-5-2008/"&gt;http://www.alvinashcraft.com/2008/09/05/dew-drop-september-5-2008/&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>The Weekly Source Code 34 - The Rise of F#</title><link>http://blogs.msdn.com/andrewkennedy/archive/2008/09/04/units-of-measure-in-f-part-three-generic-units.aspx#8964792</link><pubDate>Thu, 25 Sep 2008 12:46:31 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8964792</guid><dc:creator>Readed By Wrocław NUG members</dc:creator><description>&lt;p&gt;First, let me remind you that in my new ongoing quest to read source code to be a better developer ,&lt;/p&gt;
</description></item><item><title>re: Units of Measure in F#: Part Three, Generic Units</title><link>http://blogs.msdn.com/andrewkennedy/archive/2008/09/04/units-of-measure-in-f-part-three-generic-units.aspx#8965412</link><pubDate>Thu, 25 Sep 2008 21:54:34 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8965412</guid><dc:creator>CarlMon</dc:creator><description>&lt;p&gt;Thanks for the great post!&lt;/p&gt;
&lt;p&gt;I am trying to get my head around UoM... &amp;nbsp;Is it possible to define partially generic units? &amp;nbsp;Consider my attempt at currency conversion:&lt;/p&gt;
&lt;p&gt;[&amp;lt;Measure&amp;gt;]&lt;/p&gt;
&lt;p&gt;type USD =&lt;/p&gt;
&lt;p&gt; static member convert (value : float&amp;lt;USD&amp;gt;) (ratio : float&amp;lt; _ / USD&amp;gt;) = value * ratio&lt;/p&gt;
&lt;p&gt;The static method has signiture:&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;quot;value:float&amp;lt;USD&amp;gt; -&amp;gt; (float&amp;lt;'a0&amp;gt; -&amp;gt; float&amp;lt;USD/'a0&amp;gt;)&amp;quot;&lt;/p&gt;
&lt;p&gt;it converts a ratio of type float&amp;lt;EUR / USD&amp;gt; correctly but does not limit the ratio USD exchange rates. &amp;nbsp;I would like this signiture to be:&lt;/p&gt;
&lt;p&gt; &amp;nbsp;&amp;quot;value:float&amp;lt;USD&amp;gt; -&amp;gt; (float&amp;lt;'a0 / USD&amp;gt; -&amp;gt; float&amp;lt;'a0&amp;gt;)&amp;quot;&lt;/p&gt;
</description></item><item><title>Defining Generic Types</title><link>http://blogs.msdn.com/andrewkennedy/archive/2008/09/04/units-of-measure-in-f-part-three-generic-units.aspx#8975908</link><pubDate>Sat, 04 Oct 2008 00:01:12 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8975908</guid><dc:creator>xelatihy</dc:creator><description>&lt;p&gt;Andrew,&lt;/p&gt;
&lt;p&gt;I do wonder if the 4th part of the series will be coming soon. I am using this feature for a new research project and have found it impossible to be able to. My problem is defining 3D vectors/points that are generic with respect to the units of measures. I have had significant trouble in particular with operator overloading. Any help would be fantastic! &lt;/p&gt;
</description></item><item><title>Recursos de F# y Programación Funcional</title><link>http://blogs.msdn.com/andrewkennedy/archive/2008/09/04/units-of-measure-in-f-part-three-generic-units.aspx#8996041</link><pubDate>Sat, 11 Oct 2008 18:54:24 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8996041</guid><dc:creator>Angel "Java" Lopez</dc:creator><description>&lt;p&gt;F# es un lenguaje funcional, creado por Microsoft. Implementado bajo el soporte de .NET CLR, es un lenguaje&lt;/p&gt;
</description></item><item><title>F#中有趣的计量单位</title><link>http://blogs.msdn.com/andrewkennedy/archive/2008/09/04/units-of-measure-in-f-part-three-generic-units.aspx#9156009</link><pubDate>Sat, 29 Nov 2008 15:23:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9156009</guid><dc:creator>Anders Cui</dc:creator><description>&lt;p&gt;NASA气象卫星意外坠落说明，计量单位绝非小事。为编程语言添加对计量单位的支持可以很大程度上避免这样的错误，编程任务也变得更有趣。F#提供了对计量单位的静态检查，并且封装了国际单位制的各个单位和物理常量，另外我们也可以定义自己的单位；在单位之间进行换算也很简单；此外F#还支持计量单位的泛型。作为对NASA气象卫星的纪念，本文最后给出了一个模拟太阳系的例子 :)&lt;/p&gt;
</description></item><item><title>F# Programming Contest, by Kean at AutoDesk</title><link>http://blogs.msdn.com/andrewkennedy/archive/2008/09/04/units-of-measure-in-f-part-three-generic-units.aspx#9306220</link><pubDate>Sun, 11 Jan 2009 22:24:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9306220</guid><dc:creator>Don Syme's WebLog on the F# Language and Related Topics</dc:creator><description>&lt;p&gt;Kean over at AutoDesk (think AutoCAD etc.) is running an F# programming contest ! I've included his post&lt;/p&gt;
</description></item><item><title>Konkurs F# i AutoDesk</title><link>http://blogs.msdn.com/andrewkennedy/archive/2008/09/04/units-of-measure-in-f-part-three-generic-units.aspx#9411625</link><pubDate>Wed, 11 Feb 2009 03:09:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9411625</guid><dc:creator>.neting in the free world</dc:creator><description>&lt;p&gt;Ostatnio ponowiłem wysiłki do opanowania nowych język&amp;#243;w z rodziny MS w tym także implementacji znanych&lt;/p&gt;
</description></item><item><title>Konkurs F# i AutoDesk</title><link>http://blogs.msdn.com/andrewkennedy/archive/2008/09/04/units-of-measure-in-f-part-three-generic-units.aspx#9425656</link><pubDate>Mon, 16 Feb 2009 13:12:20 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9425656</guid><dc:creator>.neting in the free world</dc:creator><description>&lt;p&gt;Ostatnio ponowiłem wysiłki do opanowania nowych język&amp;#243;w z rodziny MS w tym także implementacji znanych&lt;/p&gt;
</description></item></channel></rss>