Why F#?

I’ve often been asked to answer the questions, “Why F#? Why is it important?” I struggle to answer this question. I don’t really understand it. Part of the problem is that I try to provide an answer. These questions cannot be answered without first understanding why the questioner likes or enjoys his or her current tool chain. So, if you are curious about why someone might want to use F# and don’t want a stream of unique language features, please comment and tell me why you like what you use today. I would really like to know. I really want to be able to help you find an answer because I think F# has a lot of great benefits for everyone.

I also realized that this question is hard because I don’t have another story. I came to .NET from writing a lot of VBA, PHP, Ruby, and JavaScript. I lucked out in coming to C# when .NET 3.5 was just released. While I find C# (and VB.NET for that matter) very useful languages for building applications, I never had a love for them. I did love LINQ, so I naturally fell in love with F# because of its similarities to LINQ and terse, Python-like syntax. However, these are not reasons for choosing a language.

Ultimately, I use F# because I think about problems in such a way that F# is a natural expression of my thoughts. I have rarely released any production software written in F#, but I nearly always prototype ideas in F# before translating to C# in my projects. I find the translation to C# takes additional thought processes that get in my way when trying to solve the original problem, so this works for me. I could easily push the F# into my apps; I don’t simply because most of my clients want to maintain C# codebases. As I mentioned above, C# is a great language and very useful for building applications.

I know many people who think F# is interesting but don’t write it. I think the hurdle is simply a paradigm shift. Much like paradigm puzzles, you typically have to have someone show you or walk you through the paradigms. Once you understand it, you have a hard time trying to remember how you didn’t understand it before. For that reason, I recommend you find a local F# user group or join the Community for F# for an online meet up. Visual F# MVP Mathias Brandewinder spent his summer traveling around hosting machine learning dojos, and those really help people through the necessary paradigms. If he comes through your area, definitely join in, even if you don’t think you care about F#.

Visual C# MVP Bryan Hunter has often commented that just knowing multiple languages helps you write better code and understand how to best and most simply solve problems. He’s right. Don’t stop at F#. Try other languages outside of .NET such as Erlang, Clojure, JavaScript, and other languages and platforms unlike your own. You will never regret the lessons you learn and will usually find new, simpler ways to solve problems.

Advertisements

4 thoughts on “Why F#?

Comments are closed.