I’ve been using a functional approach in my programming of late. I know that mutability and state changes are big no nos within the paradigm. I now find myself working with databases and other data structures where state must be changed. I’ve been trying to learn about monads and other means of interacting with state, but I’m struggle to grasp the concept.
I was wonder, what’s the proper way to deal with state and necessary state changes? What sort of functional constructs can be used and how can I use them. And more importantly, how should I be thinking about the interaction while I’m coding?
Would this be a scenario where it would be a good idea to switch to OOP or some other paradigm? If I do that, how should I think about that interaction and working across paradigms.