4 ms·
Just to add to this, more to the spot of your question, i think a no side-effect is often desirable, but i dont think it should be an impediment. As you might
by oscargrouch 7y ago
Just to add to this, more to the spot of your question, i think a no side-effect is often desirable, but i dont think it should be an impediment.
As you might need to call another function inside of our procedure that mutates some data.
But i think there are some sort of problems we are imposing to ourselves just because we need to deal with the millions possible ways a data could be laid out or modeled based in our type-system centric world.
In my perfect world, we should model functions in a DNA fashion, so function is also data, and if is mutable, could even be changed by the data depending of the what is in it.
First, we would never have to re-create a function again, and if we do, the data signature would be exactly the same as the other one created before, so we can match in a index for instance.
Im more inspired by the way things are done in the natural world, than the way we ended up shaping math (where the concepts of FP are more based on).