5 ms·
As far as I can tell F# is one of those things where every single user is extremely happy. This happens rarely and I really am curious about the thing but never
by eknkc 2y ago
As far as I can tell F# is one of those things where every single user is extremely happy. This happens rarely and I really am curious about the thing but never had time to get into it. I'm also pretty well versed in the .net ecosystem so it's probably gonna be easy.
Any tips? What kind of workflows might benefit the most if I were to incorporate it (to learn..)?
- piokoch 2y ago"As far as I can tell F# is one of those things where every single user is extremely happy" Isn't it because language has rather small community of passionate people, who are devoted to their language of choice? F# popularity is somewhere between CHILL, Clipper and Raku langs, that are probably as obscure as F# for typical software dev.
- psychoslave 2y agoI know Raku from Perl fame, and F# because it’s Microsoft, but CHILL and Clipper are totally new to me, so in my own humble experience these two latter look far more obscure. :D
- orthoxerox 2y agoClipper is old. It's dBase/xBase/FoxPro, pre-SQL DBMSs.
- int_19h 2y agoI'm pretty sure that there's more production code written in F# than in all those other three combined.
- DeathArrow 2y agoIf we consider number of jobs, it's probably on par with Rust.
- munchler 2y agoF# shines on the back end, where its functional-first style is very adept at crunching data. Think about data flows in your system: Any place where you use LINQ in C# today to select/filter/transform data might be even better in F#. Parsing is also a great F# use case (e.g. parser combinators), although a fairly narrow niche.
- pjc50 2y agoThe funny thing is that you can write very similar code in C#, so maybe you don't need to switch which language you're using as a CLR frontend. using System.Linq; using System; var names = new string[] {"Peter", "Julia", "Xi" }; names.Select(name => $"Hello, {name}").ToList().ForEach(greeting => Console.WriteLine($"{greeting}! Enjoy your C#")); LINQ is such a good library that I miss it in other languages. The Java stream equivalent just doesn't feel as fluent.
- bob1029 2y agoYou can write a vast majority of your C# codebase in a functional style if you prefer to. All the good stuff has been pirated from F# land by now: First-class functions, pattern matching, expression-bodied members, async functional composition, records, immutable collections, optional types, etc.
- guhidalg 2y agoI don't know if there's a name for it but essentially F# is where the language designers can push the boundaries and try extremely new things that 99% of users will not want or need, but eventually some of them are such good ideas that they feed back into C#. Maybe that's just research, and I'm glad that Microsoft hasn't killed F# (I do work there, but I don't write F# at work.)
- debugnik 2y ago> F# is where the language designers can push the boundaries It really isn't, not anymore. F# now evolves conservatively, just trying to remove warts and keep up with C# interop. And even then some C# features were considered too complex/powerful to implement (e.g. variance, scoped refs) or implemented in weaker, incompatible ways when C#'s design is considered messy (e.g. F#'s non-nullable constraints disallow value-types, which breaks for some generic methods written in C#, sadly even part of the System libs).
- UK-Al05 2y agoA language is just as much about what it can't do, then what it can do.
- JohnyTex 2y agoPersonally I think F# is excellent for writing ye olde CRUD applications, especially as the business logic becomes more complex. F# is really good at domain modeling, as creating types comes with minimal overhead. C# has improved a lot in this area (eg record types) but it’s still got a long way to go. I wrote a tutorial about how to get up and running with web dev in F# that might be of interest: https://functionalsoftware.se/posts/building-a-rest-api-in-giraffe-pt1 https://functionalsoftware.se/posts/building-a-rest-api-in-g...
- DeathArrow 2y agoThank you, for someone interested in using F#, that is great. I see you use Giraffe but I wonder how hard would it be to use Web API or to mix F# projects with C# projects in the same solution.