| I didn’t get a sense of anti-java-ism from the parent poster. While I enjoy Kotlin more than Java I see the benefits of both, and from most folks I’ve spoken to about the two they seem fairly level-headed about the situation. I think that for all language discussion online that there is a very small percentage of people that get over-inundated by the emotional feeling of “investing their time” into a language and wanting to not feel like they made a mistake or that their time was a waste. I wish f# got the same treatment Kotlin did tooling wise, because if I were to compare the “interoperability” of the two with the incumbent on their respective VMs, my experience has shown that developing with Kotlin incurs much less friction on a day-to-day basis. I have no doubt that part of that friction is due to the radically differing foundations that f# vs c# were built on, which as a positive for f# gives it some very cool features that Kotlin won’t have, but it leads one to ponder the RoI of diverging from the primary language. I do agree with you that googles choice to adopt Kotlin for android rather than invest further into modernizing the jvm capabilities to allow for Java to be able to keep up better was definitely a boost to Kotlin, I assume they made that choice in a calculated manner. I also wonder if Kotlin would be seeing as much server side use at places like Google, was, Airbnb, etc if not for that move on googles part. |
For example, compared to GP comment on coroutines - starting with version 6, F# natively supports writing asynchronous code with task CEs that are based on the same Task<T> type as async methods in C#. Asynchronous sequences (IAsyncEnumerable<T>) can be consumed with first-party FSharp.Control.TaskSeq package and work both ways too (ironically, it's what prompted me to look into F# in more detail, noticing how much terser working with them was compared to C#).
F# mainly lacks the kind of push Kotlin gets by being first-class on Android. But at the same time F# has excellent tooling support with Ionide and FSAC which can be consumed from VS Code, Neovim/Emacs and anything else that works with LSP, and there are two separate commerical offerings with first-class support - Rider and Visual Studio. It is also shipped out of box with .NET SDK including F# interactive for scripting which I find very productive.
If I were to employ it in my team for a task F# is particularly well-suited for, it would be a low-risk change that would not require other contributors to take any extra steps to work with it - it slots right into the same solutions and most F#-declared types can be consumed as is from C#. The adaptation effort required for experienced developers should be minimal too.