4 ms·
F# really is the most "production" a general-purpose functional language is right now, IMO. Languages like Elm have really hit their niche but you can't, say, w
by d3nj4l 5y ago
F# really is the most "production" a general-purpose functional language is right now, IMO. Languages like Elm have really hit their niche but you can't, say, write a CLI util in Elm (maybe you can by now, but it's definitely not the intended usecase). I like it quite a bit, and if you're a Java/.NET programmer you should really check it out if only to learn about FP principles. But, in no particular order, here's a few things about it that I just don't like:
1. F# is pretty clearly a second-class citizen on the CLR compared to C#, and IMO this really hamstrings the biggest advantage of F#, i.e. access to the CLR. For example, until F# 6.0 F# had its own Async primitives while C# had its own, and you can guess which one most CLR libraries tended to use.
2. Some of OCaml's more advanced type features didn't make it to F#, notably functors - and as a result writing generic code involves writing classes and interfaces and not functors or typeclasses. I really don't like this bit of F#, and I wish it had a more FP way for writing generic code. If you want a much more elegant FP experience, OCaml is significantly better.
3. The community is small, not as small as, say, OCaml's, but IMO if you want a thriving community for a hosted FP language Scala is more interesting. But Scala is much more "multi-paradigm" and OO than I like, so I prefer F#.
- dnautics 5y ago> F# really is the most "production" a general-purpose functional language is right now, IMO You're kidding, right? Cisco (and juniper?) Switches run erlang on the control plane, as does freaking Whatsapp and the British NHS; discord, divvy, brex, pagerduty, slab, PepsiCo, Boston MTA, and stripe use elixir to varying degrees, not to mention tons of companies you haven't heard of.
- pharmakom 5y agoErlang is functional too but I think OP meant in the ML family.
- deleted 5y ago[deleted]
- Smaug123 5y agoF#'s async primitives are much more ergonomic than `Task` though. For example, cancellation is trivial to control with very little boilerplate, whereas `Task` requires boilerplate all over the place.