How difficult is it to learn F# for experienced C# 3.0 developers, and/or what would you say is the most difficult part of learning F#?
One of the reasons the F chord is difficult to play is because it's positioned on the 1st fret of your guitar. A good rule of thumb to remember is as follows: the lower the fret, the higher the string tension. It takes tremendous finger strength to barre across the first fret.
Just keep practicing the transitions to the F chord, do this for at least 10 minutes a day, and you should be able to switch to it smoothly within a month. F is the hardest, like people have said it's right by the nut so it's harder to fret.
The F barre chord is really one of the first major challenges you'll experience as a guitar player. Of the “first position” Major chords, it's likely the hardest to play. But there's an easier version of this chord. There's no barring required and it sounds great.
Starting out in F# (learning the syntax, scraping the surface of how to program in a functional manner) is not too hard. A good C# 3 developer familiar with LINQ and with a solid understanding of Lambda expressions should be able to pick up the basics quickly.
It is hard to say how hard it would be for them to break out the habit of object oriented problem solving, but problems that call for functional solutions should force them to make that leap. It is difficult to change your thinking unless you are presented with a new problem in my opinion.
All in all I would say it took me a week to learn the syntax and basics of the language in my spare time (2-3 hours a night). You'll need more time than that to get a real feel for functional programming though.
I am still struggling with types. I have been doing Project Euler problems to teach myself the syntax, so I haven't needed to any kind of complex user defined types so far.
The type inference the compiler does takes a little getting used to as well, as it is not always clear when it needs types to be specified, and when it can just work them out.
I would definitely suggest trying Project Euler problems for starters. Mathematical problems are always a good candidate for functional programming.
On a more general note, data processing problems are good too. List processing is very easy in functional languages, and is one of the first things you should learn IMO.
Real-world Functional Programming: I finished this book a little while ago, and found it really good for working through how to apply functional programming principals to problems using both C# and F#. Most of the examples in the book are done in both languages, using functional programming idioms specific to each language and explaining the difference between them.
For me, one of the more difficult parts was really learning algebraic data types (discriminated unions and tuples) and pattern matching, since I had really not deeply encountered these concepts in other languages.
As for getting up to speed, here is my favorite online content for learning F#. Since you're coming from C#, you may find 'what does this C# code look like in F#' useful.
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