F# Changes The Way You Work With Your Code
I’m mostly talking about C# because it’s the programming language I’m most familiar with after using it for over two decades.
However, I came across a great article about whether tests are documentation (or not) featuring F# code.
The article shows an interesting angle on how switching from C# to F# changed how the author approaches automated testing.
The following quote from the article is an eye-opener for me:
“After some reflection, we came to the conclusion that well-written F# production code is even more concise than the code testing the behavior.” — Urs Enzler
From time to time, I spend a few hours to learn F#. Still, I haven’t used it in a production app yet.
I’m too comfortable using C# to solve my problems and write my code. However, at some point in the future, I want to add F# to my toolbelt, and this article is another reminder for me to give it another try.
There will come a time when I’ll hopefully understand terms like computation expressions, discriminated unions, and lightweight composition.