<?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>Correct by Construction in F#</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/04/22/correct-by-construction-in-f.aspx</link><description>Correct by Construction in F# Jomo Fisher—a theme in the design of the F# language is that problems in the code are revealed as compilation errors. Consider this C# code which is used to compose a courteous letter to a customer: enum Courtesy { Mr, Ms,</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>Microsoft news and tips &amp;raquo; Correct by Construction in F#</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/04/22/correct-by-construction-in-f.aspx#8417229</link><pubDate>Wed, 23 Apr 2008 00:00:18 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8417229</guid><dc:creator>Microsoft news and tips &amp;raquo; Correct by Construction in F#</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://microsoftnews.askpcdoc.com/?p=3805"&gt;http://microsoftnews.askpcdoc.com/?p=3805&lt;/a&gt;&lt;/p&gt;
</description></item><item><title>re: Correct by Construction in F#</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/04/22/correct-by-construction-in-f.aspx#8417344</link><pubDate>Wed, 23 Apr 2008 01:18:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8417344</guid><dc:creator>[ICR]</dc:creator><description>&lt;p&gt;I realise it's not the same and perhaps not in the spirit of the post, but I always write my switch statements in C# as:&lt;/p&gt;
&lt;p&gt;switch(Value)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt; &amp;nbsp;case A:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;...&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;break;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;case B:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;...&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;break;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;default:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Debug.Assert(&amp;quot;ERROR&amp;quot;);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;Not as good as a compile time but the extra runtime check allows you to catch missing code more often.&lt;/p&gt;
&lt;p&gt;But I understand the theme of the post. The non-nullilty of things does help to reduce a lot of errors.&lt;/p&gt;</description></item><item><title>re: Correct by Construction in F#</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/04/22/correct-by-construction-in-f.aspx#8417896</link><pubDate>Wed, 23 Apr 2008 06:26:56 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8417896</guid><dc:creator>MichaelGG</dc:creator><description>&lt;p&gt;Yea, top on my wish list for C# 4 is a non-nullable type system and discriminated unions, hopefully with some primitive pattern matching. But I'm sure I'll just be told to go use F# (which is fine by me, as soon as it's shipping in VS!)&lt;/p&gt;</description></item><item><title>Community Convergence XLIII</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/04/22/correct-by-construction-in-f.aspx#8420894</link><pubDate>Thu, 24 Apr 2008 09:11:02 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8420894</guid><dc:creator>Charlie Calvert's Community Blog</dc:creator><description>&lt;p&gt;Welcome to the forty-third issue of Community Convergence. The last few weeks have been consumed by the&lt;/p&gt;
</description></item><item><title>re: Correct by Construction in F#</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/04/22/correct-by-construction-in-f.aspx#8421468</link><pubDate>Thu, 24 Apr 2008 15:32:08 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8421468</guid><dc:creator>BlindWanderer@gmail.com</dc:creator><description>&lt;p&gt;I would assume that F# is implicitly adding some non-nullable attribute to it's classes and method parameters. Otherwise how would other languages know not to pass those classes and methods nulls?&lt;/p&gt;</description></item><item><title>re: Correct by Construction in F#</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/04/22/correct-by-construction-in-f.aspx#8422260</link><pubDate>Thu, 24 Apr 2008 20:38:33 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8422260</guid><dc:creator>MichaelGG</dc:creator><description>&lt;p&gt;Blind: Other languages don't know and will pass null; hence with interop you gotta watch it. It's just a sad result of C#/CLS not including some kind of non-nullable type system from the start. &lt;/p&gt;</description></item><item><title>F# in 20 Minutes – Part II</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/04/22/correct-by-construction-in-f.aspx#8482369</link><pubDate>Sat, 10 May 2008 01:19:41 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8482369</guid><dc:creator>Chris Smith's completely unique view</dc:creator><description>&lt;p&gt;Now that we have covered the basics, in minutes 8 - 14 we will cover the foundational concepts and types&lt;/p&gt;
</description></item><item><title>re: Correct by Construction in F#</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/04/22/correct-by-construction-in-f.aspx#8628518</link><pubDate>Sat, 21 Jun 2008 04:57:23 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:8628518</guid><dc:creator>David Nelson</dc:creator><description>&lt;p&gt;I am curious, how does F# deal with situations where null values are legitimate? Null values in programming languages are similar to null values in databases: they can cause problems if used carelessly, but they do have legitimate uses. And not all classes are well-suited to singleton &amp;quot;empty&amp;quot; values.&lt;/p&gt;</description></item><item><title>re: Correct by Construction in F#</title><link>http://blogs.msdn.com/jomo_fisher/archive/2008/04/22/correct-by-construction-in-f.aspx#9700129</link><pubDate>Thu, 04 Jun 2009 22:31:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9700129</guid><dc:creator>Jonathan Allen</dc:creator><description>&lt;p&gt;&amp;gt; a few special cases &lt;/p&gt;
&lt;p&gt;Like everytime you deal with the String type?&lt;/p&gt;
&lt;p&gt;F# should have been so much more, but their unwillingness or inability to merge option and null means that my code isn't any safer.&lt;/p&gt;</description></item></channel></rss>