3 ms·
I 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 languag
by mumblemumble 6y ago
I 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.