6 ms·
For me, F# is a beautiful, goldilocks language that has both the expressiveness and elegance of Python/Ruby and the strictness/compile-time safety of a statical
by KurtMueller 6y ago
For me, F# is a beautiful, goldilocks language that has both the expressiveness and elegance of Python/Ruby and the strictness/compile-time safety of a statically-typed language, all backed by the .net ecosystem. There's also low ceremony to get things done in F# and I use it for everyday tasks, like reading CSVs and loading relational databases.
If you're into domain-driven design, I find F# makes it easier to model your code after your line of business. I also like how F# nudges my code into an "onion-layer" architecture, where the domain of my business logic is at the core and is wrapped around with functionality like reading and validating inputs from external sources.
I also like Elm and the idea of ReasonML, so I plan to seriously check out Fable, which compiles F# to Javascript, and Elmish. There's also Saturn, which is built on top of asp.net-core
- kirse 6y agoAgree, F# is my go-to language for personal projects and client libs at work when I can get away with it. You can't beat the combination of the expressive power of F# with the entire .NET/ASP.NET (Giraffe) ecosystem underneath it.
- mdm12 6y agoSpeaking of domain-driven design, the author of this article wrote a great book called 'Domain Modeling Made Functional', which I heartily recommend (even if you don't have a specific interest in learning F#) https://www.amazon.com/Domain-Modeling-Made-Functional-Domain-Driven/dp/1680502549 https://www.amazon.com/Domain-Modeling-Made-Functional-Domai...
- hurril 6y agoAn excellent book and one that I used together with Stylish F# and F# Deep Dives to get my current job. Been writing F# full time now for over a year and I must say that it's nothing short of a brilliant language. Came here from 10 years of Scala with no .NET experience what so ever. Just overall one of the nicest experiences so far. 9/10, would recommend!
- deleted 6y ago[deleted]
- sunshinerag 6y agoif I might ask, where do you work? and/or in what domain?
- hurril 6y agoWork at a large:ish private bank i Sweden basically doing "digitization" of all customer processes.
- candl 6y agoI have been debating whether to learn Scala or F# in my spare time. F# seems to be the more pragmatic choice. Doesn't go the insane way of FP that Scala does with complicated libraries or convoluted inheritance hierarchies. The Scala community seems more divided than the F# one with multiple competing ecosystems/libraries for achieving the same thing. My interest lies in webdev/backend and F# seems to be an obvious choice with asp.net and it's supplanting libraries. Not sure how Scala fares, but i guess it's not the primary use case for it. On the surface I kind of like the syntax of Scala, it's very familiar but I fear that I would get more frustrated the deeper I would dig because eventually you have to integrate other people's code and the way most of it is written looks to be like haskell in disguise. Not really sure about the pros/cons.
- jmfldn 6y agoVeteran Scala dev here. I'm not here to convince you to choose it over F# but I can tell you that it's a beautiful language. Scala is used heavily for backend web dev, in fact, it's all I use it for. Don't worry about advanced concepts, you'll get to those when / if you need them. They have their uses but it depends on what you're working on. I think many people just succumb to the blub paradox too quickly with these sorts of languages. It's a real shame. It's honestly overstated how hard it is. I started as a junior dev with Scala and was highly productive within months. I don't think there's anything special about me. I was highly motivated by my love for the language I guess.
- mumblemumble 6y agoI recently came back to F# after a long-ish (about 5 years) hiatus, and I'm coming to agree. It does lack some of the features of more purely functional languages, but, in return, you get some very pragmatic features that I expect to be a net win for maintainability in a team setting. The one thing I still wish I could have is some sort of higher-kinded polymorphism, because I think that could make the business domain modeling even easier than it already is. But, as a Scala dropout, I also appreciate the eminent sobriety of being so cautious about introducing features that would create friction with the rest of the ecosystem.
- lou1306 6y agoHave you taken a look at FSharpPlus [0] ? It attempts at... "reproducing" higher-kinded polymorphism by means of abstract classes and operators for Functor, Monad, Applicative, and so on. It's a bit clunky (and if compilation goes wrong, you may get some epic-length error messages), but when you set up your tipes just right, it's pretty magical. [0] https://github.com/fsprojects/FSharpPlus https://github.com/fsprojects/FSharpPlus
- phillipcarter 6y agoSeconding the use of FSharpPlus for this kind of programming. It's certainly not for beginner F# programmers, but the library is very well-crafted by some expert F# developers who really know what they're doing.
- jmfldn 6y ago"For me, F# is a beautiful, goldilocks language that has both the expressiveness and elegance of Python/Ruby and the strictness/compile-time safety of a statically-typed language, all backed by the .net ecosystem. There's also low ceremony to get things done in F# and I use it for everyday tasks, like reading CSVs and loading relational databases." If I replaced F# for Scala in this paragraph it would sum up my feelings about Scala (swapping .net for Java obv). I'm intrigued by F#, would love to try it one day. I definitely agree about the intersection between DDD and these sorts of FP languages. It's still not fully appreciated how nicely these two things fit together.