by pbnjay · 11y ago · 0 comments
I don't want to start an imperative-vs-functional war or anything, but I've noticed many of the people complaining about Go seem to be functional programming aficionados. Is this because of how much they like embedding and abstractions, or is it because they're trying to put the square Go peg into the round FP hole?
But is that unreadability due to the nature of generic code, or due to the empty interface hack that Go forces you to use?
Now that structures based on Category Theory (generic types, lambdas, monads, futures/promises...) are being adopted by most mainstream programming languages, side effects can be described in a declarative way that is thread-safe and thus amenable to parallelism, will still allowing developers to write in a mostly imperative style.
It's a rare instance where we can really get the best of both worlds. I'm optimist about future developments of PLs.