Because it’s great, and people that think otherwise are dead to me.
Why F#?
141–150 of 424 posts
Re: Why F#?
#142I want to ask a weird question. I'd love to learn ASP.net but i can't bring myself to deal with Microsoft Windows and their tech. Is F# a way for me to learn enough NET to make some money?
C# and F# both work fine with Rider or VS Code on Mac or Linux.
Re: Why F#?
#143Does anyone else find interesting that people who write blog posts saying "my favourite language is X", it's never a mainstream language..?
Re: Why F#?
#144F# was for me the best functional language when I looked at rewriting a Ruby on Rails app. I wanted to go with a functional language, as it seems to better fit my thinking and reasoning, and I looked at Haskell, Ocaml, Scala, F#. Being a stranger to Microsoft technologies, F# was the least likely to be chosen, but easily became the first choice. Haskell's purity made it hard to adopt (for me), Ocaml's ecosystem is su…
Apache Spark, Delta Lake are written Scala. Being JVM based, it has a large ecosystem. Scala seems like a better choice than F#.
F# on the JVM would be great though!
Re: Why F#?
#145Re: Why F#?
#146As 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..)?
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-g...
Re: Why F#?
#147Earlier quoted context omitted.
The syntax is exactly the same. You have `var x = await` in C# and `let! x =` in F# The controller handler is also the same. It will be marked with `async` keyword in C# and `task` CE in F#
It's absolutely not exactly the same; let! is only available within a computation block. If you want to return some value from the computation block and return to Functional land without having to pause the thread you need to use a continuation, which C# has built in syntactic sugar for in async/await and F# does not.
Re: Why F#?
#148F# was for me the best functional language when I looked at rewriting a Ruby on Rails app. I wanted to go with a functional language, as it seems to better fit my thinking and reasoning, and I looked at Haskell, Ocaml, Scala, F#. Being a stranger to Microsoft technologies, F# was the least likely to be chosen, but easily became the first choice. Haskell's purity made it hard to adopt (for me), Ocaml's ecosystem is su…
Apache Spark, Delta Lake are written Scala. Being JVM based, it has a large ecosystem. Scala seems like a better choice than F#.
However, the best functional programming language is, of course, Elixir. :D
Re: Why F#?
#149Here's a Saas that actually makes money written fully in F# https://3dpack.ing Here's a rust ray tracer compiled to web assembly written in F# https://ncave.github.io/fable-raytracer/ source: https://github.com/ncave/fable-raytracer?tab=readme-ov-file
Re: Why F#?
#150I've been using F# professionally for the past seven years across different contexts. First in a small software shop and now while bootstrapping a SaaS company. Some observations: * It’s easier to attract smart developers to an F# project than to a [mainstream language] project. This was one of my driving beliefs when I introduced F# seven years ago. https://www.paulgraham.com/pypar.html . This is probably just as tr…
As a 20+ year C# dev...where do I learn how to structure apps in F#? In C# my ASP.NET Controller might use a service (or a mediator) to execute some domain logic and that in turn will use a repository pattern (or EF DbContext) to update/query a database. How are dependencies injected in? It seems like there are multiple ways of going about it, but I don't have enough knowledge of F# to know 'the proper way' to do it.
https://fsharpforfunandprofit.com/posts/dependencies/
FWIW you can do it exactly the same way you do it in C#; it’s not “wrong”, it might just feel a bit out of place.