I'm very interested in what F# has to offer and I'm very keen to start the time based investment necessary to learn it. However are the F# jobs going to start to materialise or could it be a wasted investment?
At the risk of starting a flame war, I like to think of F# as a better OCaml with fewer gotchas and a better library. I don't find it hard to believe that F# would entice large parts of the OCaml community to cross over into .NET Land.
(This strategy seems eerily similar to the approach that Microsoft used when it tried to lure Java developers using J#, which turned out to be a flot. Let's hope F# doesn't go down in the same way.)
At least in my experience, .NET software shops tend to use VB.NET and C# at the exclusion of all other languages. VB.NET and C# are especially marketable because:
They have extremely well-developed RAD and GUI support. F# GUIs need to be written by hand, making the language unsuitable for developing large, complex user interfaces.
Existing documentation is written in C# and VB.NET, making it easy for newbie programmers to learn C# and VB.NET at the same time they learn the .NET BCL. F# programmers are required to mentally translate from C#/VB.NET, so at the very least knowing C# is already a prerequisite for learning F#.
VB.NET/C# ride on the coattails of the familiar imperative programming style established by Java and C++. Functional programming exists far outside the mainstream, which slows down the crossover of programmers from imperative languages to F#.
At the very least, I'm optimistic for F#. It has a few things going for it that you just don't see in other languages:
Its had a ton of media exposure in blogs, and I've seen F# demos in the last 5 .NET conferences I've attended.
I follow programming blogs religiously, and it looks like the programming community at large has become frustrated with lock-based approach to multithreading. Mutable state in multithreaded is a killer, which has prompted many programmers to switch over to a lock-free style using immutable datastructures. Immutability comes more naturally in F# than C#, and async workflows in F# make multithreaded code extremely easy to reason about.
F# really is better at certain tasks than C#. For example, anything involving the transformation of XML or sourcecode to an abstract syntax is orders of magnitude easier in F# in 100% of cases.
C# is becoming more and more "functional" with each new development. This helps to bring functional programming more into the mainstream and into widespread acceptance. While you can write C# in a functional style, most people find it very clumsy, especially when there are a lot of generic types involved. Its as if the functional features were tacked on as an afterthought -- its just easier to write a functional style using a real functional language like F#.
Most importantly, F# is not just another C# clone with a different syntax. My company uses F# to compliment our existing C# codebase because it provides a whole new set of tools that just aren't readily available in C#.
If F# goes mainstream, I imagine it'll be used in the way mentioned in the final bulletpoint, as a companion language to C# and VB.NET. People aren't going to adopt F# because its a superior alternative to C#/VB.NET, people will use F# when they grow out of the One True Language™ / "everything looks like a nail" approach to writing software.
It is going to be part of Visual Studio 10 so it cannot hurt to know it
See this
I doubt that functional programming languages will ever be extremely popular. However, F# could easily be the most successful functional language. It has an enormous library behind it (i.e. the .NET CLR), it integrates seamlessly with very popular languages (C#, VB, etc), and before long it will be supported in the most popular IDE in the world (Visual Studio).
I don't see how time spent learning F# would be a waste. You can always call your F# components from C#. Also, you can learn a new way of thinking about programming that you could carry with you no matter what language you use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With