Dealing with state problems in functional programming
Posted
by
Andrew Martin
on Programmers
See other posts from Programmers
or by Andrew Martin
Published on 2014-06-09T00:43:39Z
Indexed on
2014/06/09
3:41 UTC
Read the original article
Hit count: 331
functional-programming
I've learned how to program primarily from an OOP standpoint (like most of us, I'm sure), but I've spent a lot of time trying to learn how to solve problems the functional way. I have a good grasp on how to solve calculational problems with FP, but when it comes to more complicated problems I always find myself reverting to needing mutable objects. For example, if I'm writing a particle simulator, I will want particle "objects" with a mutable position to update. How are inherently "stateful" problems typically solved using functional programming techniques?
© Programmers or respective owner