by davesque · 5y ago · 0 comments
However, I have to say that I don't think the author succeeded in showing me "that real engineering is functional." During my tour of FP, I would always eventually run into a wall of abstraction as soon as things got more than a little bit complicated. In that sense, Factorio comes across as a bit of a contrived example. As soon as you have an algorithm that lends itself to a few pieces of mutable state in a loop with complex terminating conditions, good luck. Yes, it's theoretically possible to shoehorn things like that into the formalities of FP. However, doing so usually ends up feeling like an academic exercise more than anything else. It doesn't feel like it moves you any closer to your ultimate goals; to implement functionality more quickly, cleanly, and intelligibly.
That being said, I don't regret getting into FP for a while. It's always a useful challenge to re-frame what you think you know with a different set of concepts. FP also works really well for certain kinds of problems. But I think the number of those are relatively few. This may be reaching, but I like to believe there's some historical precedent for this. After all, none other than Kurt Gödel himself eventually abandoned the λ-calculus in favor of Turing's mechanical (imperative) framing of computation. I want to believe there was some similar sentiment behind this decision. But who knows? It was probably more of a technical thing than I realize. But I've always felt on some level that an overabundance of abstraction necessarily means a lack of power.
This isn't my experience trying to read documentation and tutorials with similar libraries in both Scala and Haskell
I would go so far as to say that ZIO is like the Python of the realm. It's practically oriented and beginner friendly first and foremost. Also Scala is easier to understand than Haskell, but that's an opinion.
That's all just to say that the issue isn't FP in general, but the way FP has been implemented in beginner-unfriendly ways.