Revisiting F#
I bet you many C# developers can relate to this: you picked up F# years ago to see what the fuss was all about, got very excited about it, worked with it, then got fed up with it and stayed with C#. You loved the functional bits, the language, but the tooling and constant troubleshooting of misplaced “,” and type inference adventures drove you crazy and unproductive.
At least that was my experience with F#. Yet I get why people use it, why they swear by it. I just never got to the point where I could let C# go and use F# every day.
As years go by, the time spent in F# has not gone to complete waste. C# has evolved and introduced functional language constructs. The baggage is heavy as the language supports both styles of programming now, but if you know what you are doing, you can write some pretty neat and clear code that has no side effects, passes functions around, and encourages functional composition.
I have a bit more time these days to experiment and I dug into F# again to see if the tooling has gotten any better. And I can easily say yes, it has. VSCode with Ionide extensions makes reading F# code a breeze. But here is the thing: the benefits of the conciseness are pretty much gone. C# has done away with much of the ceremony of {} and whatnot, you can write some truly short and clear code now. The pattern matching is not as powerful, but unless you are a hardcore functional programmer — you are not even sure what you are missing.
I am split right now if I will pursue F# further or if I will stick with C# in my day-to-day existence. Part of me wishes that I was put in a situation where I had no choice but to write a complex system with F# and force myself to adapt the patterns and the language but I am not sure if I have an opportunity like that available. If anyone has an F# project where you need an experienced C# dev on, give me a shout, we can work something out!
UPDATE: a little bit less than a month in of using just F# and I have to say, I like it. There is not a lot of putzing around it feels like, writing code, solving problems, and everything is a pipeline of some sort.
Granted, I only wrote code for personal projects, but it was a project that solved a very specific business need I had with trading. It involved fetching data from APIs, storing it in DB, generating HTML so that I could view the data in a nice format, etc. So far so good!