<?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/"
		>
<channel>
	<title>Comments on: Functional programming and F#: Introduction</title>
	<atom:link href="http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/feed/" rel="self" type="application/rss+xml" />
	<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/</link>
	<description>Monkey #121643810 reporting for duty...</description>
	<lastBuildDate>Wed, 18 Nov 2009 20:43:49 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Sam Stokes</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-3230</link>
		<dc:creator>Sam Stokes</dc:creator>
		<pubDate>Mon, 29 Dec 2008 21:02:42 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-3230</guid>
		<description>Good News, Bad News:
Good News: You can use Visual Studio with F#
Bad News: Visual Studio Express versions do not support F#
Good News: Build it yourself!  Follow this link to a free download of the Visual Studio Shell, which is quick and easy download as well as install (although if you VS 2008 Pro or Team System):
http://www.microsoft.com/downloads/details.aspx?FamilyId=40646580-97FA-4698-B65F-620D4B4B1ED7&amp;displaylang=en

After you do the installation of the Visual Studio Shell, go to this site and download the latest version of F#, follow the simple installation instructions:

http://www.microsoft.com/downloads/details.aspx?FamilyID=61ad6924-93ad-48dc-8c67-60f7e7803d3c&amp;displaylang=en</description>
		<content:encoded><![CDATA[<p>Good News, Bad News:<br />
Good News: You can use Visual Studio with F#<br />
Bad News: Visual Studio Express versions do not support F#<br />
Good News: Build it yourself!  Follow this link to a free download of the Visual Studio Shell, which is quick and easy download as well as install (although if you VS 2008 Pro or Team System):<br />
<a href="http://www.microsoft.com/downloads/details.aspx?FamilyId=40646580-97FA-4698-B65F-620D4B4B1ED7&amp;displaylang=en" rel="nofollow">http://www.microsoft.com/downloads/details.aspx?FamilyId=40646580-97FA-4698-B65F-620D4B4B1ED7&amp;displaylang=en</a></p>
<p>After you do the installation of the Visual Studio Shell, go to this site and download the latest version of F#, follow the simple installation instructions:</p>
<p><a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=61ad6924-93ad-48dc-8c67-60f7e7803d3c&amp;displaylang=en" rel="nofollow">http://www.microsoft.com/downloads/details.aspx?FamilyID=61ad6924-93ad-48dc-8c67-60f7e7803d3c&amp;displaylang=en</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam Stokes</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-3228</link>
		<dc:creator>Sam Stokes</dc:creator>
		<pubDate>Mon, 29 Dec 2008 20:56:36 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-3228</guid>
		<description>Manjeet,
Sorry about the delay, this is the first time I have read this blog, hopefully you have found help.  But if you haven&#039;t here are some links to get you started:
Download the F# CTP from here (</description>
		<content:encoded><![CDATA[<p>Manjeet,<br />
Sorry about the delay, this is the first time I have read this blog, hopefully you have found help.  But if you haven&#8217;t here are some links to get you started:<br />
Download the F# CTP from here (</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam Stokes</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-3229</link>
		<dc:creator>Sam Stokes</dc:creator>
		<pubDate>Mon, 29 Dec 2008 20:56:36 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-3229</guid>
		<description>Manjeet,
Sorry about the delay, this is the first time I have read this blog, hopefully you have found help.  But if you haven&#039;t here are some links to get you started:
Download the F# CTP from here (</description>
		<content:encoded><![CDATA[<p>Manjeet,<br />
Sorry about the delay, this is the first time I have read this blog, hopefully you have found help.  But if you haven&#8217;t here are some links to get you started:<br />
Download the F# CTP from here (</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: manjeet</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-2890</link>
		<dc:creator>manjeet</dc:creator>
		<pubDate>Tue, 16 Sep 2008 04:52:17 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-2890</guid>
		<description>I want to know that F# in Avalabile on visual studio2005 or not and how to write a simple programm in f#</description>
		<content:encoded><![CDATA[<p>I want to know that F# in Avalabile on visual studio2005 or not and how to write a simple programm in f#</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-2741</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Tue, 02 Sep 2008 15:40:36 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-2741</guid>
		<description>Michael:  Oh, I agree. There&#039;s nothing special about F#, or even formally defined functions versus anonymous functions. The key is the CLR, not a particular language. I just think F# would be a natural place to implement this kind of thing. The more I think about it, there would probably have to be some sort of pragma to tell the JIT compiler that it will be worth recompiling something, or maybe the compiler could figure it out from context (i.e. if you use a curried function in a List.map, for example). For all I know, something like this happens already. Maybe I should ask this question on the F# list...</description>
		<content:encoded><![CDATA[<p>Michael:  Oh, I agree. There&#8217;s nothing special about F#, or even formally defined functions versus anonymous functions. The key is the CLR, not a particular language. I just think F# would be a natural place to implement this kind of thing. The more I think about it, there would probably have to be some sort of pragma to tell the JIT compiler that it will be worth recompiling something, or maybe the compiler could figure it out from context (i.e. if you use a curried function in a List.map, for example). For all I know, something like this happens already. Maybe I should ask this question on the F# list&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-2739</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Tue, 02 Sep 2008 07:32:15 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-2739</guid>
		<description>OK, I see what you mean. I&#039;m just not sure that partial evaluation adds anything new. If the JIT could do this, it should be able to do it to current C# code even. What&#039;s the difference? 

For instance, even with a normal &quot;tupled&quot; call, if you wrapped it with constants for the certain parameters, the same argument should hold. (Most overloaded functions in .NET are exactly this, in reverse order.) I guess the JIT could trace and when it sees a specific set of arguments being passed enough times, it can emit specific code for them or something like that... 

I suppose the compiler could determine constants at compile time and make a decision to inline them. 

In fact, just by poking around it seems as if the F# compiler already does this (statically) if you mark a function &quot;inline&quot;. For instance, create an inline wrapper around your polyval_aux and add cases for [] -&gt; and a::b::c::[] -&gt; a + b*x + c*x*x. Then disassemble the calling code and you&#039;ll see it does statically handle the pattern matching. 

It also seems to do it in other, simpler, cases, even without marking it inline. I guess over time the compiler will get better and do it on more cases? (Balancing of course, code bloat...)</description>
		<content:encoded><![CDATA[<p>OK, I see what you mean. I&#8217;m just not sure that partial evaluation adds anything new. If the JIT could do this, it should be able to do it to current C# code even. What&#8217;s the difference? </p>
<p>For instance, even with a normal &#8220;tupled&#8221; call, if you wrapped it with constants for the certain parameters, the same argument should hold. (Most overloaded functions in .NET are exactly this, in reverse order.) I guess the JIT could trace and when it sees a specific set of arguments being passed enough times, it can emit specific code for them or something like that&#8230; </p>
<p>I suppose the compiler could determine constants at compile time and make a decision to inline them. </p>
<p>In fact, just by poking around it seems as if the F# compiler already does this (statically) if you mark a function &#8220;inline&#8221;. For instance, create an inline wrapper around your polyval_aux and add cases for [] -&gt; and a::b::c::[] -&gt; a + b*x + c*x*x. Then disassemble the calling code and you&#8217;ll see it does statically handle the pattern matching. </p>
<p>It also seems to do it in other, simpler, cases, even without marking it inline. I guess over time the compiler will get better and do it on more cases? (Balancing of course, code bloat&#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-2738</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Tue, 02 Sep 2008 03:16:59 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-2738</guid>
		<description>Michael: What I meant was that when you call a curried function without the full number of arguments, I *think* that in theory the plumbing is available in .NET to actually have the resulting function recompiled, with the given variables substituted in as constants.

For example, consider if I created a function by writing

let mypoly = polyval [1. 2. 3.];;

I think the way it&#039;s handled now, the resulting &quot;function&quot; mypoly is really just essentially a delayed evaluation of polyval. If I call mypoly a million times with different arguments, polyval is still fully evaluated each time.

However, in theory I would think a smart enough CLR could recompile the original CIL code for polyval, with the constant list [1. 2. 3.] substituted in. A smart JIT compiler could then do some clever loop unrolling, essentially resulting in mypoly being compiled dynamically as if I&#039;d written

let mypoly x = 1. + 2.*x + 3.*x*x;;

I think .NET&#039;s CLR has just scratched the surface of the kind of runtime optimizations of which it&#039;s ultimately capable, and I would think functional programming would be a paradigm where a JIT could do a lot of really interesting stuff. I predict that at some point, especially on many-core systems, .NET code will run faster than unmanaged C code.</description>
		<content:encoded><![CDATA[<p>Michael: What I meant was that when you call a curried function without the full number of arguments, I *think* that in theory the plumbing is available in .NET to actually have the resulting function recompiled, with the given variables substituted in as constants.</p>
<p>For example, consider if I created a function by writing</p>
<p>let mypoly = polyval [1. 2. 3.];;</p>
<p>I think the way it&#8217;s handled now, the resulting &#8220;function&#8221; mypoly is really just essentially a delayed evaluation of polyval. If I call mypoly a million times with different arguments, polyval is still fully evaluated each time.</p>
<p>However, in theory I would think a smart enough CLR could recompile the original CIL code for polyval, with the constant list [1. 2. 3.] substituted in. A smart JIT compiler could then do some clever loop unrolling, essentially resulting in mypoly being compiled dynamically as if I&#8217;d written</p>
<p>let mypoly x = 1. + 2.*x + 3.*x*x;;</p>
<p>I think .NET&#8217;s CLR has just scratched the surface of the kind of runtime optimizations of which it&#8217;s ultimately capable, and I would think functional programming would be a paradigm where a JIT could do a lot of really interesting stuff. I predict that at some point, especially on many-core systems, .NET code will run faster than unmanaged C code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-2733</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Mon, 01 Sep 2008 17:45:11 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-2733</guid>
		<description>Jonathan: I&#039;m not quite sure I follow on the whole &quot;dynamically creating functions&quot; part. Could you elaborate a bit more?</description>
		<content:encoded><![CDATA[<p>Jonathan: I&#8217;m not quite sure I follow on the whole &#8220;dynamically creating functions&#8221; part. Could you elaborate a bit more?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-2731</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Sun, 31 Aug 2008 22:40:45 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-2731</guid>
		<description>Michael: Thanks for writing. I don&#039;t really have it out for Haskell. It just has the bad luck of people very often giving the same dumb reason for why others should use it that it was easy to link to. I meant it as a general criticism of the way functional languages are often touted by simply wowing people with brevity of implementation. Anyway, I probably should&#039;ve just picked on Lisp. Nobody defends Lisp. 

Yes, the makeincrementor is utterly useless. I just wanted to illustrate the fact that you can have function factories that generate functions with runtime-decided parameters, so that I could then make the point that in the context of the CLR, one is essentially generating code on-the-fly. I don&#039;t think the CLR actually takes advantage of this, but I&#039;m intrigued by the unique possibilities of curried functions in a virtual machine environment.</description>
		<content:encoded><![CDATA[<p>Michael: Thanks for writing. I don&#8217;t really have it out for Haskell. It just has the bad luck of people very often giving the same dumb reason for why others should use it that it was easy to link to. I meant it as a general criticism of the way functional languages are often touted by simply wowing people with brevity of implementation. Anyway, I probably should&#8217;ve just picked on Lisp. Nobody defends Lisp. </p>
<p>Yes, the makeincrementor is utterly useless. I just wanted to illustrate the fact that you can have function factories that generate functions with runtime-decided parameters, so that I could then make the point that in the context of the CLR, one is essentially generating code on-the-fly. I don&#8217;t think the CLR actually takes advantage of this, but I&#8217;m intrigued by the unique possibilities of curried functions in a virtual machine environment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-2728</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Sun, 31 Aug 2008 20:13:14 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-2728</guid>
		<description>A few comments. First, no, brevity is not a complete measurement, but simplicity in the brevity is. The nice thing about Haskell and F# is that the base syntax is not very complicated, and everything else is defined _on top_ of that. At first two languages may look indistinguishable by brevity, but it&#039;s the underlying rules that end up making the difference between succinct elegance and a jumble of magic.

On &quot;currying&quot;, Maybe it was just an example, but the definition of mmakeincrementor is actually useless. You could just as well do:
&gt; let incrbyfive = (+) 5;;
val incrbyfive : (int -&gt; int)
[I understand currying to be taking something of the form (a,b) -&gt; c and turning into a -&gt; b -&gt; c. From there, we can do partial function application. Currying is more useful with .NET methods since they all come in &quot;tupled&quot; form.]

As far as OO, it quickly starts dropping out of your mindset. It&#039;s so much easier to think and work with a function when you know it reacts only based on its arguments and not if someone somewhere else had called Foo on it before or not. On top of that, in a lot of places where someone would use inheritance, it&#039;s quite easy just to pass in a function to &quot;override&quot; behaviour. 

The real feat of F# is that MSRC/Don Syme got Microsoft to actually adopt it as a commercial endeavour. I&#039;m guessing they had a &quot;way in&quot; due to the fact that they did generics for the CLR already.</description>
		<content:encoded><![CDATA[<p>A few comments. First, no, brevity is not a complete measurement, but simplicity in the brevity is. The nice thing about Haskell and F# is that the base syntax is not very complicated, and everything else is defined _on top_ of that. At first two languages may look indistinguishable by brevity, but it&#8217;s the underlying rules that end up making the difference between succinct elegance and a jumble of magic.</p>
<p>On &#8220;currying&#8221;, Maybe it was just an example, but the definition of mmakeincrementor is actually useless. You could just as well do:<br />
&gt; let incrbyfive = (+) 5;;<br />
val incrbyfive : (int -&gt; int)<br />
[I understand currying to be taking something of the form (a,b) -&gt; c and turning into a -&gt; b -&gt; c. From there, we can do partial function application. Currying is more useful with .NET methods since they all come in "tupled" form.]</p>
<p>As far as OO, it quickly starts dropping out of your mindset. It&#8217;s so much easier to think and work with a function when you know it reacts only based on its arguments and not if someone somewhere else had called Foo on it before or not. On top of that, in a lot of places where someone would use inheritance, it&#8217;s quite easy just to pass in a function to &#8220;override&#8221; behaviour. </p>
<p>The real feat of F# is that MSRC/Don Syme got Microsoft to actually adopt it as a commercial endeavour. I&#8217;m guessing they had a &#8220;way in&#8221; due to the fact that they did generics for the CLR already.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg M</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-2726</link>
		<dc:creator>Greg M</dc:creator>
		<pubDate>Sun, 31 Aug 2008 00:37:12 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-2726</guid>
		<description>Mmm yeah, I totally agree. I have some fear that we are going to end up with half-hearted FP entrenched as a standard - like C++ did for half-hearted OO - but it&#039;s still a step in the right direction and the people behind it are people who I know are going to want to get it right.</description>
		<content:encoded><![CDATA[<p>Mmm yeah, I totally agree. I have some fear that we are going to end up with half-hearted FP entrenched as a standard &#8211; like C++ did for half-hearted OO &#8211; but it&#8217;s still a step in the right direction and the people behind it are people who I know are going to want to get it right.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dew Drop - August 30, 2008 &#124; Alvin Ashcraft's Morning Dew</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-2725</link>
		<dc:creator>Dew Drop - August 30, 2008 &#124; Alvin Ashcraft's Morning Dew</dc:creator>
		<pubDate>Sat, 30 Aug 2008 23:18:01 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-2725</guid>
		<description>[...] Functional Programming and F#: Introduction&#160;and&#160;Functional Programming and F#: Newton Basin Fractal Example Code (Jonathan Birge) [...]</description>
		<content:encoded><![CDATA[<p>[...] Functional Programming and F#: Introduction&#160;and&#160;Functional Programming and F#: Newton Basin Fractal Example Code (Jonathan Birge) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-2724</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Sat, 30 Aug 2008 21:41:15 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-2724</guid>
		<description>Greg: Being relatively new to functional programming, I haven&#039;t gotten to the point where I&#039;m ready to give up OO entirely, but I believe you when you say you can achieve everything you need to without it. One thing I will say, however, is that it&#039;s nice to have in F# at least so that you can interact natively with .NET frameworks. I think that&#039;s one reason why F# might actually become a widely used language, where others have never really managed to venture too far from the ivory towers.</description>
		<content:encoded><![CDATA[<p>Greg: Being relatively new to functional programming, I haven&#8217;t gotten to the point where I&#8217;m ready to give up OO entirely, but I believe you when you say you can achieve everything you need to without it. One thing I will say, however, is that it&#8217;s nice to have in F# at least so that you can interact natively with .NET frameworks. I think that&#8217;s one reason why F# might actually become a widely used language, where others have never really managed to venture too far from the ivory towers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-2723</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Sat, 30 Aug 2008 21:18:06 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-2723</guid>
		<description>Štěpán: Thanks very much for the comment. The xpow argument represents the current power of x that is being added to the polynomial, so it get&#039;s &quot;incremented&quot; by multiplication repeatedly with x. I know I didn&#039;t explain this very well; thanks to your comment I&#039;ve gone back and edited that part to make it more clear.</description>
		<content:encoded><![CDATA[<p>Štěpán: Thanks very much for the comment. The xpow argument represents the current power of x that is being added to the polynomial, so it get&#8217;s &#8220;incremented&#8221; by multiplication repeatedly with x. I know I didn&#8217;t explain this very well; thanks to your comment I&#8217;ve gone back and edited that part to make it more clear.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg M</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-2719</link>
		<dc:creator>Greg M</dc:creator>
		<pubDate>Sat, 30 Aug 2008 07:40:46 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-2719</guid>
		<description>Having written enough imperative code the FP (higher-order functions and monads, instance declarations seperated from type definitions) way and the OO way, I just don&#039;t see the point of OO anymore. Message-passing is good for Actors, but if you aren&#039;t doing it for concurrency, then it&#039;s just too blunt a tool to properly express the abstraction and polymorphism you want for any but the simplest of programs.</description>
		<content:encoded><![CDATA[<p>Having written enough imperative code the FP (higher-order functions and monads, instance declarations seperated from type definitions) way and the OO way, I just don&#8217;t see the point of OO anymore. Message-passing is good for Actors, but if you aren&#8217;t doing it for concurrency, then it&#8217;s just too blunt a tool to properly express the abstraction and polymorphism you want for any but the simplest of programs.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Štěpán Kozák</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-2718</link>
		<dc:creator>Štěpán Kozák</dc:creator>
		<pubDate>Sat, 30 Aug 2008 07:28:59 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-2718</guid>
		<description>Hi,

First, I&#039;d like to thank you for the article - in fact it&#039;s the first time I have come across F# language.

This language will definitely be a good part of .NET familly - it will bring the functional paradigm to more people - just because Microsoft is the &quot;father&quot; of the language. It will bring the choice and it&#039;s allways good, but to say the truth I prefer Haskell syntax - the readability is on much higher level. 

PS: There is a mistake in the polyval_aux function example - the xpow value is not incremented correctly - it shouldn&#039;t be (xpow *x), but (xpow + 1) ...</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>First, I&#8217;d like to thank you for the article &#8211; in fact it&#8217;s the first time I have come across F# language.</p>
<p>This language will definitely be a good part of .NET familly &#8211; it will bring the functional paradigm to more people &#8211; just because Microsoft is the &#8220;father&#8221; of the language. It will bring the choice and it&#8217;s allways good, but to say the truth I prefer Haskell syntax &#8211; the readability is on much higher level. </p>
<p>PS: There is a mistake in the polyval_aux function example &#8211; the xpow value is not incremented correctly &#8211; it shouldn&#8217;t be (xpow *x), but (xpow + 1) &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jonathan</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-2714</link>
		<dc:creator>Jonathan</dc:creator>
		<pubDate>Fri, 29 Aug 2008 18:24:58 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-2714</guid>
		<description>Greg: I do have to admit the Haskell sort it is rather easy to understand, but given that it&#039;s not even actually implementing a real quicksort and would never be used in practice, I do think it&#039;s just a cute trick. It was a cheap joke, but I stand behind the underlying point that comparisons between languages based on brevity are pointless.

I like Haskell syntax and F# syntax about the same, in fact. Actually, part of me likes Haskell a bit better, because it&#039;s purer and simpler. F# is a bit of a mess and given that it&#039;s owned by MS, it&#039;s only going to get worse. But in the end, I think I&#039;ll be able to do a lot more with F# than with Haskell, so I&#039;m bothering to learn F#.

I don&#039;t think the OO elements of F# are a crutch, they are an option. Sometimes functional approaches are best, sometimes imperitive and OO programming paradigms are called for. I imagine the best solution will often be a mix, such as an OO interface with a functional programming implementation behind the scenes. I don&#039;t want my language to turn me into an idealogue, I want it to get out of the way and let *me* choose the approach.

At any rate, didn&#039;t mean to insult Haskell programmers. It wasn&#039;t about Haskell in particular but about the general arguments used in favor of functional languages. If Microsoft research had decided to implement Haskell as a .NET language and added OO features to it, I&#039;d be writing this article about H#.</description>
		<content:encoded><![CDATA[<p>Greg: I do have to admit the Haskell sort it is rather easy to understand, but given that it&#8217;s not even actually implementing a real quicksort and would never be used in practice, I do think it&#8217;s just a cute trick. It was a cheap joke, but I stand behind the underlying point that comparisons between languages based on brevity are pointless.</p>
<p>I like Haskell syntax and F# syntax about the same, in fact. Actually, part of me likes Haskell a bit better, because it&#8217;s purer and simpler. F# is a bit of a mess and given that it&#8217;s owned by MS, it&#8217;s only going to get worse. But in the end, I think I&#8217;ll be able to do a lot more with F# than with Haskell, so I&#8217;m bothering to learn F#.</p>
<p>I don&#8217;t think the OO elements of F# are a crutch, they are an option. Sometimes functional approaches are best, sometimes imperitive and OO programming paradigms are called for. I imagine the best solution will often be a mix, such as an OO interface with a functional programming implementation behind the scenes. I don&#8217;t want my language to turn me into an idealogue, I want it to get out of the way and let *me* choose the approach.</p>
<p>At any rate, didn&#8217;t mean to insult Haskell programmers. It wasn&#8217;t about Haskell in particular but about the general arguments used in favor of functional languages. If Microsoft research had decided to implement Haskell as a .NET language and added OO features to it, I&#8217;d be writing this article about H#.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Greg M</title>
		<link>http://scripts.mit.edu/~birge/blog/functional-programming-and-f-sharp-intro/comment-page-1/#comment-2712</link>
		<dc:creator>Greg M</dc:creator>
		<pubDate>Fri, 29 Aug 2008 07:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://scripts.mit.edu/~birge/blog/?p=189#comment-2712</guid>
		<description>That Haskell code is not a &quot;clever little trick&quot;, it&#039;s the bog-standard way to write it and no Haskell programmer would have any trouble reading it.

The only way the F# version would differ is to use explicit &quot;match&quot; declarations and lambda expressions because F# doesn&#039;t have syntactic sugar for pattern-matching and &quot;sections&quot; that Haskell does.

Since they&#039;re a fundamental language feature and a ubiquitous idiom, everyone who knows the language know what they mean. It might be a matter of taste which syntax you prefer, but I posit that you only prefer the F# versions because you&#039;ve seen similar in other languages. I&#039;m familiar with both versions and must say I prefer reading the less verbose syntax.

Apart from syntax, you could implement it some other way (less functionally, I guess) but your code wouldn&#039;t be as good. The OO parts of F# are a nice crutch for beginners, but you can&#039;t really run with crutches.</description>
		<content:encoded><![CDATA[<p>That Haskell code is not a &#8220;clever little trick&#8221;, it&#8217;s the bog-standard way to write it and no Haskell programmer would have any trouble reading it.</p>
<p>The only way the F# version would differ is to use explicit &#8220;match&#8221; declarations and lambda expressions because F# doesn&#8217;t have syntactic sugar for pattern-matching and &#8220;sections&#8221; that Haskell does.</p>
<p>Since they&#8217;re a fundamental language feature and a ubiquitous idiom, everyone who knows the language know what they mean. It might be a matter of taste which syntax you prefer, but I posit that you only prefer the F# versions because you&#8217;ve seen similar in other languages. I&#8217;m familiar with both versions and must say I prefer reading the less verbose syntax.</p>
<p>Apart from syntax, you could implement it some other way (less functionally, I guess) but your code wouldn&#8217;t be as good. The OO parts of F# are a nice crutch for beginners, but you can&#8217;t really run with crutches.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
