Saturday, March 07, 2009 6:09 PM
Let’s Wax Functional 03/06/2009
This week we have MapReduce, WebTools and yet another F# to C# language comparison. I spent yesterday at a seminar led by Michael de la Maza. He, Talbot Crowell and I will soon be starting a F# user’s group in Boston, Massachusetts. I’m interested in any comments you might have. Please feel free to send me an email if you would like to discuss speaking at it or content you would like to see covered.
Google’s MapReduce software framework has revolutionized the way software engineers think about processing large data sets. Since it’s introduction at least 15 variants have been developed. Thorough as always, Matthew explores what MapReduce is, how it relates to functional programming and, finally, shows his own light-weight MapReduce implementation.
The F# Web Tools augment the F# distribution with tools to author homogeneous client/server/database web applications in one type-checked project.
In this post Martin compares solutions to Project Euler problems 10 and 12 in both C# and F#. In competition with his friend Giles Knap, he wrote his answers in C# while Giles wrote in F#. Afterward, each set of answers is discussed independently. He concludes that the languages were equally readable but the F# implementations were slower.
I wish Giles had written a rebuttal post as Martin seems to be a die hard C# fan. I don’t agree that they were equally readable. The F# problems lacked much of the syntactic cruft and whitespace found in the C# examples.
Also, as single core results are fast becoming meaningless, it would be very if they would agree to use asynchronous workflows in F# and compare that with the .NET Parallel Extensions in C#. By constraining the answers to be single thread only, it seems like they avoided much of F#’s inherent benefit in multicore processing.
I also can’t help wondering how each of their prime generating examples would compare with the memoizing example I mentioned two weeks ago. I’d be shocked to see a similar C# implementation in anywhere near as little space.