How is Go anti FP? It's anti-generic programming and I think that's a great idea.
As a side note, there are a LOT of considerations that are implicit within a language when you do functional programming. Let me explain. Let's consider a `map` function. There are at least 2 ways to write a non-generic map function:
func MapSafe(f func(int) int, l []int) []int {
retVal := make([]int, len(l)
for i := range l {
retVal[i] = f(l[i])
}
return retVal
}
func MapClobber(f func(int) int, l []int) []int {
for i := range l {
l[i] = f(l[i])
}
}
Any good FP-er will tell you clobbering data is NOT a good idea - that functional programming is all about immutable data. Yeah, the immutable data version however, allocates memory. So you either need:
a) impressive compiler building skills to reason that for some application of `map` clobbering can be done, and for others it cannot;
b) failing to do that, you would need a very awesome GC that handles memory that work on a very short timescale (that is, within callframes)
Rust is nice in the sense that the compiler does a LOT of the heavy lifting, but it's far from userfriendly. Requiring users to manage and be clear about memory ownership is a Hard Sell (though I will concede, a Good Idea). Haskell is another language which relies heavily on the compiler, and GHC is an amazing compiler. However, performance for Haskell isn't that great. It's on the opposite end of the scale: super user friendly, offloads a lot of work to the compiler, but suffers in performance.
The problem is I don't think we're there yet. Not with Go, but with functional languages. State wrangling is still a problem. Running away from it by hiding under layers of functional language works for a small number of problems (business rules,etc) but in my view, not the majority of the problems. Programmers don't spend a lot of time on high level problems.
A long time ago, there was a compiler for Haskell called JHC. It was nice because you could use it to write C, which would expose the underlying state for the programmer to modify to her heart's content. The project's been dead for 5-6 years now I think. GHC has a weird --from-c option that I've never been able to use mainly because you needed to recompile GHC from scratch, which again is something I struggle with and rapidly give up.