I love the F# language and it’s encouraging to read this post and hear a lot of things have only been improving in the past decade. Auto-boxing equality sounds so obvious in the intro and those improvements are huge! It’s a shame I won’t be able to use them at work for another two years in .NET 10 (LTS)
I used to write Windows CLI apps and automation scripts in F#. It is the most usable functional language, imo, and felt natural to progress to from PowerShell with its pipelines syntax when I started transitioning into development for my career.
When I say usable, it has all the interop with the .NET ecosystem and isn’t puritanical about being a functional language. I think a large weakness is performance and community, but both fronts have been improving over the past decade (as the post indicates). I still run into missing batteries from NuGet from time to time if they’re not used very often in the C# domain.
I think a large weakness is performance and community, but both fronts have been improving over the past decade (as the post indicates).
Could you speak to the community aspect a bit more? I am interested in F# and when I investigated it in the past I found that the community seemed a bit mixed on the future of F#. There were concerns about how serious Microsoft is about maintaining the language and it seemed like some libraries skipped .NET versions. Generally, it seemed like they were simultaneously being dragged forward by MS and concerned that they were going to be left behind.
Functional languages in general are more niche and so have smaller communities. F# being a Microsoft functional language makes it even more niche in that regard. My experience over time has improved, but there were quite a few packages that were obviously designed only for C# and F# basically treated like it didn’t exist which made using them very annoying as you had to reach into the imperative parts of F# or write your own wrappers way more frequently than you wanted to.
I don’t think F# will ever go away at this point, and the velocity of features in the last several releases has me very hopeful that it’s only improving.
I understand this is about the company, but I was impressed in the cross-platform support for .NET Core. I was using F# in place of Python as a scripting language for a few months in a hobby project, and my scripts run without changes on Windows, Mac and Linux.
Would you expect to have to make changes for the equivalent python scripts? (More as a point of curiosity, as well as getting a sense of how far to the edge of the platform support the workload went).
Powershell 7+ also has a decent level of cross platform support, though it is a -far- stranger language than either F# or Python, IMO.
I’m not the one being asked, but I have been using F# professionally for the past 2 years and my experience has been really good overall.
As strengths:
The type system is strong enough to encode rules with it and not strict enough that it becomes a hassle to write. I really miss it when writing other languages!
.NET interop is insanely useful, I can write small wrappers to make things a bit more functional but that’s definitely not necessary. Coming from a big Go web codebase, I see myself reaching less for third-party libraries on the .NET world.
I can mix paradigms, write functional code where it is best suited and switch to OOP where it really shines.
As weaknesses:
.NET has a lot of libraries for everything you could ever possibly think of, but the F# alternatives are usually not there or the F# wrapper is usually not up-to-date with upstream.
Some advanced runtime features arrive late on the F# land.
Type providers were not as good as I thought they would be, unfortunately
I love the F# language and it’s encouraging to read this post and hear a lot of things have only been improving in the past decade. Auto-boxing equality sounds so obvious in the intro and those improvements are huge! It’s a shame I won’t be able to use them at work for another two years in .NET 10 (LTS)
Do you use F#? What has your experience been? What do you feel are its relative strengths and weaknesses?
I used to write Windows CLI apps and automation scripts in F#. It is the most usable functional language, imo, and felt natural to progress to from PowerShell with its pipelines syntax when I started transitioning into development for my career.
When I say usable, it has all the interop with the .NET ecosystem and isn’t puritanical about being a functional language. I think a large weakness is performance and community, but both fronts have been improving over the past decade (as the post indicates). I still run into missing batteries from NuGet from time to time if they’re not used very often in the C# domain.
Could you speak to the community aspect a bit more? I am interested in F# and when I investigated it in the past I found that the community seemed a bit mixed on the future of F#. There were concerns about how serious Microsoft is about maintaining the language and it seemed like some libraries skipped .NET versions. Generally, it seemed like they were simultaneously being dragged forward by MS and concerned that they were going to be left behind.
Functional languages in general are more niche and so have smaller communities. F# being a Microsoft functional language makes it even more niche in that regard. My experience over time has improved, but there were quite a few packages that were obviously designed only for C# and F# basically treated like it didn’t exist which made using them very annoying as you had to reach into the imperative parts of F# or write your own wrappers way more frequently than you wanted to.
I don’t think F# will ever go away at this point, and the velocity of features in the last several releases has me very hopeful that it’s only improving.
I understand this is about the company, but I was impressed in the cross-platform support for .NET Core. I was using F# in place of Python as a scripting language for a few months in a hobby project, and my scripts run without changes on Windows, Mac and Linux.
Would you expect to have to make changes for the equivalent python scripts? (More as a point of curiosity, as well as getting a sense of how far to the edge of the platform support the workload went).
Powershell 7+ also has a decent level of cross platform support, though it is a -far- stranger language than either F# or Python, IMO.
That’s good to hear! I’ve heard that the community is also a bit more independent from MS than C# so it may be more resilient to changes in patronage.
I don’t know if I’ll ever get to really dive into the language, but I’m rooting for it on the sidelines.
I’m not the one being asked, but I have been using F# professionally for the past 2 years and my experience has been really good overall.
As strengths:
As weaknesses:
A self-reply as I was corrected by the F# PM, this feature will actually be in .NET 8 via a patch update, so that’s even better!
Careful folks, we’re being watched. @_@