Comment by rr808
12 hours ago
> IME is a bigger foot gun than
Pretty much true for any functional feature. Great in the classroom, less practical in the real world.
12 hours ago
> IME is a bigger foot gun than
Pretty much true for any functional feature. Great in the classroom, less practical in the real world.
Trying to be as functional as possible I think has great benefits in the "real world". Functions are very easy to unit test, for one.
Pure functional is difficult, but breaking out the parts of the program which can be pure functional is generally a smart thing to do
If I had drive and ability the to make a programming language from scratch, it would be hybrid imperative/functional, and "pure" functions (no side effects, EXCEPT possibly debug logging) would be clearly marked as such.
Pure functional isn't too difficult once you understand how to put everything that causes side effects on the side. You can write a domain layer in a purely functional manner and feed it data from non-pure sources. It's definitely a shift in thinking for people used to something like OOP, but once you make it, writing software functionally is not difficult. There's really not many ways to approach it, unlike OOP for which there are hundreds of books and approaches.
I studied FP in college. I currently work on a large low latency C++ codebase. I honestly have no idea how I'd use pure functional concepts everywhere in this context. I'm also probably doing it wrong.
1 reply →