[Warning: I am not a coder, just interested in the topic. So I don’t really know what I am talking about ]
Recently I stumbled across a presentation about the paradigm of Functional Programming.
Two important aspects of this coding approach are:
Write “clean functions”: You pass an input (or many) into the function and return an output - no calling or writing of global variables from inside the function, no “side-effects”, only the return value
Immutable Data: To avoid data being changed under your nose while running a function, you make all data storage immutable. E.g. instead of changing (overwriting) an element in an array, you create a copy with the updated element. To prevent lots of redundant copies of data, you only write new entries and use some clever tree-structure to reference all the most up-to-date data.
It sounded extremly Ceptr-ly to me. So I wanted to ask:
Is Functional Programming a thing with Holochain developers? And if not, should it be?
Would love to hear your thoughts!