I have to admit learning F# has been great fun so far. Coming from C#, I feel like a fish out of water and even the smallest of tasks seems to stop me in my track as I try to wrap my brain around solving problems functionally.
When I think back over the years I haven’t really learned a new programming language, they have all been so similar. I started back the early 80’s with Basic on the Commodore Vic 20 and C64. Then I learned C, C++, VB, then finally C#. Back at the start when I first learned Basic, I can still remember being amazed and excited about the untapped possibilities with programming a computer.
I dived into programming without any clue as to how to solve problems, but somehow I managed to get through and end up with something to show for my efforts, driven only by my love of this fantastic thing that’s called computer programming. Over the years, this feeling unfortunately diminished somewhat.
Still, F# is challenging, different and great fun. It really does take me back to my early days of programming. I find myself looking forward to coming back from work, just so I can start on a new coding kata.
For coding challenges I’ve been using cyber-dojo.org. I have to admit that I’m solving these problems by just diving in and trying.
With F# I seem to spend more time reasoning about a piece of logic and getting it to compile than I do with C#, but when done it seems to work first time.
I have no idea, at this point, about the maintainability of F# code over time. My impression is that it might be tempting to write less expressive code in order achieve compact functions.
Short functions are good, but expressive and short is better.
I can’t see why all the OO principles that I have learned shouldn’t apply to F#. The SOLID principles, writing expressive code, keeping functions short avoiding coupling etc should all apply to functional programming.
I decided to learn F# for a couple of reasons. First, I’m betting on new computer hardware coming with more and more processors on board as manufacturers are now left with this as the only option to increase computing power. Simple ways to solve parallel problems has got to be a winner and obviously functional programming helps with this. The second reason is that I’m drawn to learning a language that is a bit more challenging than mainstream C#. Back in the C and C++ days, programmers not up to the job just dropped out because the entry barrier was too high. My impressions is that F# has a higher entry barrier and may attract programmers that love to program rather than programmers that just pick up a pay check at the end of the month.
What’s up next? I’m going to hammered away at more katas for a while and then I was thinking of looking at Akka.net and monogame. They both look like they could be great fun to mix in with F#.
Any other suggestions?