109 points · by todsacerdoti · 5y ago · 60 comments
I also dislike the default workflow for dealing with Nuget forks. I switched to Paket for dependency management which makes this much simpler. https://fsprojects.github.io/Paket/
This is already bearing fruit in the latest preview: https://devblogs.microsoft.com/dotnet/announcing-net-6-previ...
I also saw this lovely update for Xamarin.Forms users https://twitter.com/drasticactionSA/status/13802626828724428...
F# is low risk to adopt compared to OCaml. F# is the functional language pick that won’t get you fired.
In the long term there is far less chance that the INRIA drop OCaml than microsoft drop F#.
The tooling is poor in general, the interop is questionable at best. One example is `Option a` in F# becomes `FSharpOption<A>` in C#, with `None` being `null` - breaking all of the type-safety of the union-type. It isn't seamless in the way some might have you believe. The standard answer is build a wrapper to expose F# to C#, which is ok, but is an extra level of indirection and complexity that shouldn't be needed (if indeed the idea is to have seamless interop).
I developed language-ext [1] to bridge the divide, but in the end there isn't a strong enough reason to write F# all the time in the .NET sphere. It is compromised by an ecosystem where C# is dominant. That includes the framework libraries and even the limitations of the type-system in F# (no higher kinds for example). There's no real reason for F#, other than a nicer syntax, it doesn't have a killer USP like Haskell (purity) or Erlang (concurrency).
If it wasn't in C#'s shadow, and it was able to run free, and without compromise, there could be a compelling narrative - but what we're doing now is moving to PureScript for our front-end, and Haskell for microservices where we need the USP of Haskell (purity and strict domain modelling).
However given the whole Project Reunion and uncertainity how both worlds are supposed to be merged, maybe it isn't such a big deal.
Ah and don't expect Code Generators to ever support F#.
In some ways, on the other hand F# has active patterns and type providers, which are quite magical.
It’s super easy to mix C# and F# code in the same project and it works out of the box.
This allows you, if you want it, to write your domain code in F# and your technical code in C#.
in frontend, bucklescript changes too quickly. js of ocaml is hard to use. good luck if you want to trim the code size.
PureScript does have an Erlang backend as well.
My understanding is F# relies on a JIT just as Node (V8) does. Are either really native? Are both?
FAFAIK Node doesn't compile to an intermediate language, it either compiles to minimzed (lets-just-remove-all-whitespace) Javascript, or it generates a native binary.