DEV Community

Discussion on: What are your thoughts on functional programming? In PHP?

Collapse
 
underscorefunk profile image
John Funk

We definitely switch gears quickly. I'm not saying so much that FP is "the right way" but that I've personally found having pure functions and coding in a functional style solves a lot of problems for me. And that when applications get huge and complicated, having things split out nicely and not contingent on object state, a lot easier to reason about.

I still really like objects as a way to structure my code, but then I write methods in a functional (for the most part) style.