Learning a new Language: F#

Time again to learn a new language.  I enjoy picking up a new language every now and again.  It's a great way to branch out your skill set and usually leads to new programming techniques in languages that are a part of professional or hobby life.

But why bother?  The popular languages have a lot of common elements : functions, types, etc ...  With all of the common elements what can learning a new language really give you? 

It's true that there are a lot of common elements (especially for .Net based languages).  But what really interests me are the features which make the individual language extremely productive.  Most languages have a feature or two that really makes it worth learning.  They greatly increase the productivity of the developer.  Often full libraries are designed around these features.  For instance

  • C++ and  Templates
    • This is somewhat special in that it's extraordinarily powerful for both good and evil
  • VB and late binding
  • C# and iterators

What's great about learning these features is I can often import them into my current heavily used languages.  For instance, even though C#/VB don't directly support functional style programming, I've spent a bit of time over the last few months building libraries that make it fairly easy to incorporate them into either language.  This added a deal of flexibility into my programs and a real functional feel. 

Lately I've been focusing on immutable/persistant data structures, lambda expressions and tuples.  This makes F# a natural choice for a language to learn.  While I tend to program in a somewhat functional style this will be the first functional language I've heavily invested my time in.  For awhile I did a bit of Haskell but nothing serious. 

I intend to blog about the joys and not so joyful moments of this process.