Welcome to

Magenic Technologies Community Blog

Sign in | Join | Help

Aaron's Technology Musings

Who let this guy on the podium?

What does F# do that C# does not do?

This is an open question.

I read Pickering's Foundations of F# - and while there is a new syntax, clearly a lineage from OCaml, something called whitespace awareness or somesuch that gives me nightmares (note, I am not the biggest Python fan either) - I can't see anything there that has not been covered in C# 3.0, other than some syntax differences.

I could be wrong though - and probably am (and no, this is not a rhetorical post - someone could show me the way and turn me into a huge fan).  I just don't get what this is going to buy me, especially given the likely resistance I will get when I try to sell this to a client (i.e. we were gonna use C#, but to save you money, we are going to...).

The gist of this is that, by the looks, C# 3.0, with it's lambdas and expression eval capabilities, does a ton of things that F# does to make it useful, but does them in a way that I can do it with regular, conservative, clients, that don't want to try to look at the job boards for F# maintenance programmer after our consulting gig is over.

Please prove me wrong.  Pretty please.  I want to be one of the cool kids with an affinity for an alt-language too!

 

PS - I know there is something to the functional vs OO style argument.  Remember, I am a consultant, not the architect of Live Search.  Please keep that in mind.
 

Published Wednesday, September 12, 2007 7:16 PM by aarone

Filed under:

Comments

# re: What does F# do that C# does not do? @ Wednesday, September 12, 2007 7:47 PM

I am not that familiar with F# but am more so with OCAML.

It is true that C# 3.0 has introduced lots of features that enable a more functional style of programming, thanks to SPJ and Don Symes being in the employ of MS, however it is a augmentation of a relatively verbose language, looking remarkable similar to Java (but better).

The crowd of developers that will be maintaining your work are about as likely to understand lambdas, variants and eval expressions in C# about as well as F# syntax.

I like to draw a parallel with C++ and templates.  Most programmers who clain to be competent with C++ are very much the opposite when it comes to generic programming.

So your real problem will be whether you can persuade your client to let you use the advanced features of C#.

From my, admittedly ignorant, perspective, F# will allow you to express your solution in a more succint and provable fashion, developing an application in C# with certain assemblies delivered in F#, where appropriate, might be an excellent example of making good use of the ,NET runtime to apply appropriate tools to the job.  90% of the code is maintainable by day to day hacks, 10%, the critical 10% requires more expertise, you're a contractor, you know you want the repeat business.

Justin

# re: What does F# do that C# does not do? @ Tuesday, October 23, 2007 1:47 PM

I can't see a reason to use F# in your position right now. But, since Microsoft just anounced they are poductizing F#, maybe in a few years? http://blogs.msdn.com/somasegar/archive/2007/10/17/f-a-functional-programming-language.aspx Also, Jomo Fisher has a series of posts about his experiences moving from C# to F#. http://blogs.msdn.com/jomo_fisher/ The things I see from F# that make it compelling are Union Types, Pattern Matching and Quotations.

Scott Hoggarth

# re: What does F# do that C# does not do? @ Tuesday, October 23, 2007 1:57 PM

Thanks Justin and Scott.

It is interesting to see F# mature to where MSFT is going to support it mainline.  I can see certain kinds of clients - especially leading edge ones who are not afraid to try non-mainsteam stuff (i.e. not worried about trying to hire F# people).

aarone

# Coming to grips with F# and the Future @ Thursday, December 27, 2007 11:37 AM

On an earlier post, I wrote about how in C#, you can do everything you can do in F#. I hate to say this,

Aaron's Technology Musings

New Comments to this post are disabled
Powered by Community Server, by Telligent Systems