Could be! Depends if MS starts putting some more money behind it, including marketing. They're pretty deep in an AI-everything spiral right now though.
I'm a Clojure guy, but the ML family (specifically OCaml and F#) have always interested me as another branch of functional programming. I started out in the before times as a .NET Programmer (VB6 -> VB.NET -> C#) and have toyed with F# a little since then. It's cool, but the tooling leaves a lot to be desired compared to what's available for OCaml unless you decide to use full fat Visual Studio.
What I particularly like about them is the middle ground of inferred types. I don't need types since maps, lists, and value types are enough for me in almost all cases, but if I must use a strongly typed system why not let the compiler figure it out for me? I always thought that was a neat idea.
I tried F# when we were building out a scraper at a startup. After a bit, I realized that must of the things could also be done in C# and ended up using C# instead because it's just a bit more accessible. F# looks neat, but C# has a lot of parity at this point on some of the core selling points IMO.
C# can't fix the wrong defaults, still lots more mutable by default, and statement oriented, as an example.
average C# codebase looks different depending language version idioms, not so in F# (because initial release already had >80% of things that C# today doesn't even have and won't be able to fix).
Not having exceptions doesn't seem like an advantage. My experience with either tough me that some infrastructure error are better as exceptions.
Kotlin handling of nulls is probably the most elegant. And you do not need. Net. When you want 20 pods in kubernetes you probably want some alpine image instead of windows
I think, we’re not far from the day when LLMs will be spitting out highly optimized ilasm/byte-code (dotnet intermediate language representation). So your programming language will well and truly be a bunch of prompts. That’s it.
I do not understand how they could develop a language inspired by OCaml but not bring over labeled function arguments. A real L when it comes to ergonomics.
F# is a chimera of a language. The functional parts of the language are nicely designed: no nulls, discriminated unions (ADTs), you write simple functions in simple modules and there is nothing that is too clever to understand: it's very pragmatic. Then there is a whole lot of stuff like inheritance, classes, interfaces, nulls mainly there for dotnet interoperability that gets very ugly very fast. There are way too many variants of the same thing: records, classes, struct records, tuples, struct tuples etc, which are mainly there either for compatibility with similar c# stuff or because the default language constructs often result in suboptimal code. At the end I went with Rust because it has one way of doing such stuff. And for those interested in a gc language with functional features there is now Gleam
I haven't used F# too terribly much, but as a .Net dev, it's never gotten the love it deserves. I would probably have converted over if there was better third-party library support for the language. (I haven't check in a some years)
This feels like "This year is the year of Linux on the Desktop"
I've been hearing about F# hitting mainstream for over a decade. Unlike Linux, which is now fairly popular on the Desktop, I predict that F# won't ever be mainstream.
I would be very reluctant to use it because of the fear that at some point Microsoft just kills it. You have to wonder why they are keeping it alive so long as they are probably getting not much value out of it (some people here say they are using it as a testbed for functional features in C# but I don't believe this - I guess the C# team has enough resources to do their explorations on their own). I guess if Don Syme leaves Microsoft or retires that will be the end of it.
Speaking as a C# developer, who had in the past wanted to learn F#, but never got very far. What discourages me every time:
- C#'s good enough. Nothing's stopping you from writing functionally-oriented code in C# (and I do prefer that over traditional "enterprisey" object-orientation.)
- It's relatively difficult to have a codebase that is partly in C# and F# for incrementally trying things out. (I understand this is not really F#'s fault, owing to the .NET compilation model where C# and F# compilers each produce their own assemblies. And that Microsoft hardly cares about F#, and the tooling leaves a lot to be desired - admittedly I'm spoiled by C# tooling. )
- F# having its own implementations of concepts like async, option types introduces friction with C# obviously. I get that F# async is more powerful in some ways, but then again... F#'s option type is a reference type unlike C#'s Nullable<> value type, it's hard to see what's the advantage in that other than worse performance. One almost gets the impression that F# designers don't care about performance (while C# designers do in the past few years with additions to the ecosystem like Span<T>). This makes it hard to justify coding in F# for infrastructure libraries (which is what I often do).
I recently left a c# shop in finance. My background c/c++. I was very interested to see if c# was less work: easier to write and build.
I was not impressed by what I saw - it was junk code. One of the major errors was writing apps as MS services which dragged in tons of MS OS junk.
I cannot totally blame c#; i think the staff there were not engineers but more guys doing stuff.
The code was complex; replete with async calls. Build artifacts were entire directories of dlls, exes, json eg 50+ files per task.
The code was littered with warnings. The company could not or would not do hardly anything outside Visual Studio.
There were entire repos of code without comments; no method contracts, obscene reliance on exceptions.
I'm prepared to think f# could be better but never underestimate how bad things can be with a good language if the devs are not engineering grade developers.
Never under-estimates wrong defaults in a language, for example:
C++, const modifier, verbose for more correct code (less mutable state, etc.)
Rust, mut modifier, verbose for less correct code
C/C++, bothersome to have tight scopped values, due to split of expression & statement
ML languages, nesting of let bound values, everything is tight scoped, even recycling local names non destructively via shadowing.
C#: mostly, all flaws of C/C++/Java
F#: mostly all right things of ML, OCaml, Rust
F#: Structural comparison of ML types from day 1
C#: just adding records recently; most of libraries, idioms, and semantics geared towards reference comparison
idioms
C#: mainly OO, noisy syntax, low expressivity (constructing immutable values out of generators or expressions), lots of navigation due to adhoc things needed to be named, poor type inference
F#: data & functions, concise end non noisy syntax, high expressivity (list expressions, computation expression values), less scrolling & navigation, object expression rather than defining type used once, great type inference (less noisy diff on refactorings)
etc.
So average F# codebase is by construct, more sound, than average C# codebase, however F# code quality may be poor, and C# great, still, more soundness in F#, IMHO.
24 comments
[ 2.5 ms ] story [ 38.9 ms ] threadWorst case, let the "tried F# once/for real" ramblers unload their bag once more :)
I'm a Clojure guy, but the ML family (specifically OCaml and F#) have always interested me as another branch of functional programming. I started out in the before times as a .NET Programmer (VB6 -> VB.NET -> C#) and have toyed with F# a little since then. It's cool, but the tooling leaves a lot to be desired compared to what's available for OCaml unless you decide to use full fat Visual Studio.
What I particularly like about them is the middle ground of inferred types. I don't need types since maps, lists, and value types are enough for me in almost all cases, but if I must use a strongly typed system why not let the compiler figure it out for me? I always thought that was a neat idea.
average C# codebase looks different depending language version idioms, not so in F# (because initial release already had >80% of things that C# today doesn't even have and won't be able to fix).
But C# is great too, nonetheless.
Kotlin handling of nulls is probably the most elegant. And you do not need. Net. When you want 20 pods in kubernetes you probably want some alpine image instead of windows
And they just have no plans to ever fix this??
I haven't used F# too terribly much, but as a .Net dev, it's never gotten the love it deserves. I would probably have converted over if there was better third-party library support for the language. (I haven't check in a some years)
I was a Microsoft fanboy years ago but even I am completely uninterested these days.
I've been hearing about F# hitting mainstream for over a decade. Unlike Linux, which is now fairly popular on the Desktop, I predict that F# won't ever be mainstream.
- C#'s good enough. Nothing's stopping you from writing functionally-oriented code in C# (and I do prefer that over traditional "enterprisey" object-orientation.)
- It's relatively difficult to have a codebase that is partly in C# and F# for incrementally trying things out. (I understand this is not really F#'s fault, owing to the .NET compilation model where C# and F# compilers each produce their own assemblies. And that Microsoft hardly cares about F#, and the tooling leaves a lot to be desired - admittedly I'm spoiled by C# tooling. )
- F# having its own implementations of concepts like async, option types introduces friction with C# obviously. I get that F# async is more powerful in some ways, but then again... F#'s option type is a reference type unlike C#'s Nullable<> value type, it's hard to see what's the advantage in that other than worse performance. One almost gets the impression that F# designers don't care about performance (while C# designers do in the past few years with additions to the ecosystem like Span<T>). This makes it hard to justify coding in F# for infrastructure libraries (which is what I often do).
I was not impressed by what I saw - it was junk code. One of the major errors was writing apps as MS services which dragged in tons of MS OS junk.
I cannot totally blame c#; i think the staff there were not engineers but more guys doing stuff.
The code was complex; replete with async calls. Build artifacts were entire directories of dlls, exes, json eg 50+ files per task.
The code was littered with warnings. The company could not or would not do hardly anything outside Visual Studio.
There were entire repos of code without comments; no method contracts, obscene reliance on exceptions.
I'm prepared to think f# could be better but never underestimate how bad things can be with a good language if the devs are not engineering grade developers.
C++, const modifier, verbose for more correct code (less mutable state, etc.) Rust, mut modifier, verbose for less correct code
C/C++, bothersome to have tight scopped values, due to split of expression & statement ML languages, nesting of let bound values, everything is tight scoped, even recycling local names non destructively via shadowing.
C#: mostly, all flaws of C/C++/Java F#: mostly all right things of ML, OCaml, Rust
F#: Structural comparison of ML types from day 1 C#: just adding records recently; most of libraries, idioms, and semantics geared towards reference comparison
idioms
C#: mainly OO, noisy syntax, low expressivity (constructing immutable values out of generators or expressions), lots of navigation due to adhoc things needed to be named, poor type inference F#: data & functions, concise end non noisy syntax, high expressivity (list expressions, computation expression values), less scrolling & navigation, object expression rather than defining type used once, great type inference (less noisy diff on refactorings)
etc.
So average F# codebase is by construct, more sound, than average C# codebase, however F# code quality may be poor, and C# great, still, more soundness in F#, IMHO.