FP-Go: Functional programming library for Golang
1–10 of 185 posts
Re: FP-Go: Functional programming library for Golang
#2Re: FP-Go: Functional programming library for Golang
#3At the time, I remember finding FP in go surprisingly ergonomic. Implementing the library to support it was a pain since the type system wasn't expressive enough to prevent everything from devolving into a pile of untyped reflection, but it was reasonably easy to keep that an implementation detail. On the whole, I felt like go would have lent itself well to the "dash of FP for flavor" style of programming that seems to be gaining popularity these days. Unfortunately, in 2017 at least, the Go community seemed to have very little interest in the idea.
I still have a fondness for Go. It always felt nice to use. If the language features have caught up to the point where a robust library like this is feasible, and the communities attitude has shifted, I might take another look at the language.
Re: FP-Go: Functional programming library for Golang
#4Re: FP-Go: Functional programming library for Golang
#5 x := for y := range z { return y } // unclear return :-(
If you want Either, use Haskell.There seems also to be a performance problem with map(). It would work better if Go had Iteration instead of slices, otherwise map() creates a lot of slices. And if map does not return a slice you have an ugly
y := x.map(...).native
everywhere.Re: FP-Go: Functional programming library for Golang
#6These abstractions are not native to go. If you miss them, pick a better language.
Re: FP-Go: Functional programming library for Golang
#7Re: FP-Go: Functional programming library for Golang
#8I think map() is useful, even if it does not look like Go and rubs a little against the sprit of simplicity of Go. Wish the for loop in Go would return a result, which could accomplish the same but would be a little bit more Go like x := for y := range z { return y } // unclear return :-( If you want Either, use Haskell. There seems also to be a performance problem with map(). It would work better if Go had Iteration…