
Why F#? - raganwald
http://callvirt.net/blog/post/Why-F-(TechEd-09-DEV450).aspx
======
drcode
I love how the article is called "Why F#" but then just extols the virtues of
functional programming. I suppose more articles on FP are always a plus...
However, here is a bit that should be in the article but is missing:

"Why not F# for Functional Programming?"

\- It's created by Microsoft, who will drop a technology like a wet stone when
it's no longer profitable and abandon developers relying on the platform.

\- If you find a bug in F#, you have to pray Microsoft deems it worthy to be
fixed.

\- You can't learn about how F# works by studying the source code of the
language.

\- You have to spend lots of $$ to be able to program in F#.

\- Haskell is more elegant and has a more robust community.

\- You can run your code only on a Windows machine (reliably.)

There are arguments you could make defending F# as a choice (libraries, etc)
but this article doesn't address those issues.

UPDATE: Ok Ok... I admit F# has decent support on other platforms at this
point.

~~~
TomOfTTB
I won't deny F# is probably the wrong choice for people who don't use
Microsoft technology already. But still, many of your points are wrong or
misleading:

\- F# is still considered an unreleased research product so you don't know
what they'll do with it until it's released. It's within the realm of reason
that they would submit it to a standards body like they did C# at which point
your criticism is moot.

\- Your point about Open Source is a decent point. But people who choose
closed source projects tend to do so for their own set of reasons (mostly
support and the fact that they don't have the time and/or skill to look
through a languages source code to figure out a bug themselves)

\- Again, it's unreleased and you don't know what Microsoft will do with it.
At least for web development Microsoft makes free software available for using
C# and VB.NET (called Visual Web Developer). They could very well integrate F#
into that.

\- This is just opinion mixed in with conjecture (since again you're talking
about an unreleased project with no real community yet)

\- I've used Mono and found it very reliable so this is just misleading

Finally, you're quoting an article written by a guy trying to make the case to
Microsoft developers. He's talking about his upcoming talk at a Microsoft
conference after all.

~~~
javery
F# is being released with Visual Studio 2010 so its not just a research
product anymore right? Also the rest of the .NET framework source is available
so I assume F# might be at some point as well.

~~~
TomOfTTB
I think you're right but I keep hearing people at Microsoft describe it as a
research project so I figured better safe than sorry.

~~~
danek
It's official. However since it's not yet released it's still considered a
research project.

------
nearestneighbor
Out of curiosity, are Y-Combinator folks (start-up founders, etc.) programming
for .NET to begin with? It seems the focus here is usually on web apps and the
iPhone.

~~~
kogir
The majority of Loopt's backend is written in C# and runs on windows.

------
yr
what is possible with F# and not with C# ?

~~~
DanielBMarkham
Brevity and correctness.

I wrote a program last month to download a CSV file from the web, parse it,
check for dupes, and load it into a database.

It took about 20 lines of F# code.

With C# I couldn't even start on the project with that few lines of code.

It's a lot like SQL and stored procs. If you don't know what you're doing
(like me) you thrash around using cursors (for-next-loops) and such making a
mess the first time you try to solve a problem.

But then, as you get the hang of it, it all "collapses" into this beautiful,
small, piping one-line-type syntax, like one of those origami models that goes
suddenly from being folded paper to a bird or something.

If you've ever done this with stored procs and cursors, starting with a lot of
cursors and eventually using a regular SQL statement to do something that used
to take many lines of code, you know what I'm talking about. It's a thing of
beauty. I'm not convinced it reads any clearer (although FP folks say it does)
and I'm not convinced large code bases are easier to maintain -- but then
again I'm not convinced you'll really have the kind of large code bases you
see in C#/Java/etc

Ironically, this means that data structures are the critical thing in
functional programming. Even more so than in imperative languages. (In my
opinion)

~~~
yr
thanks.It gave me a good understanding of what this is capable of. How is it
in terms of performance ? Can I process gigabytes of data in minutes ?

~~~
DanielBMarkham
I've anecdotally heard of F# kicking C#s butt when it comes to throughput, but
you'll have to poke around on the web to find out more. Sorry I can't provide
more details.

~~~
TY
[http://www.google.com/search?q=F%23%20better%20performance%2...](http://www.google.com/search?q=F%23%20better%20performance%20C%23)

