|
|
|
|
|
by skydhash
438 days ago
|
|
> The days I can have even a few pure functions are few and far between. I'm honestly curious what percentage of your code bases can be this pure. A big part of it, I'm sure, but it requires some work. Pushing the side effects to the edge requires some abstractions to not directly mess with the original mutable state. You are, in fact designing a state diagram from something that was evolving continuously on a single dimension: time. The transition of the state diagram are the code and the node are the inputs and output of that code. Then it became clear that IOs only matters when storing and loading those nodes. Because those nodes are finite and well defined, then the non-FP code for dealing with them became simpler to write. |
|